9 May
2012
9 May
'12
8:24 a.m.
I am trying to create a factorial function in GHC. I am following the online learnyouahaskell.com book (specifically types-and-typeclasses page). Bear in mind this is my day 1 of learning Haskell. The book suggests: factorial :: Integer -> Integer factorial n = product [1..n] But if I enter first line then press <Enter> I see: <interactive>:1:1 Not in scope: 'factorial' What am I doing wrong? Angus