Comment Comment by gizmo686 This defiantly falls under Haskell not being noob friendly.If you are in the REPL, you want to do `let sumOfElements [] = 0`If you want multiline input, you open with `:{` and close with `:}`. Both of these need to be on their own line. For example: Prelude>:{ Prelude| let sum [] = 0 Prelude| sum (x:xs) = x + sum xs Prelude|:} As tdinkar points out, it is often easier to define your functions if a file and load that file from the REPL. parent gizmo686 12 years ago
If you are in the REPL, you want to do `let sumOfElements [] = 0`
If you want multiline input, you open with `:{` and close with `:}`. Both of these need to be on their own line. For example:
As tdinkar points out, it is often easier to define your functions if a file and load that file from the REPL.