Jeroen Pelgrims

Jeroen Pelgrims Resurge

Niner since 2009

Comments

  • C9 Lectures: Dr. Erik Meijer - Functional Programming ​Fundamental​s, Chapter 3 of 13

    I have the same problem in ghci.
    What does work though is to type:

    let f :: Int -> Int -> Int; f a b = a + b

    So you need to type the type definition and the function definition in one statement.
    I think this is because you're using an interpreter instead of a compiler.

    I'm a beginner myself so, my apologies if any of the terminology is incorrect.

     

    -edit-

    Apparently there are multiple pages of comments and this question has already been answered, oops Smiley