Skip to content

multiline functions in ghci #17

@rickbacci

Description

@rickbacci

https://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html

found out something that might be helpful to you all, you can do multi line functions with :set +m
you can create a file to make this standard as well

then what I have been doing for the next homework is using "let"

let rev xs = reverse xs
blank line with return to get out of multi line
rev [1,2,3,4]
[4,3,2,1]

figured out that you can type them on one line as well, but i thought this might help someone down the road if not now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions