[Haskell-beginners] Query regarding an unusually behaving code

amindfv at gmail.com amindfv at gmail.com
Sun Nov 15 02:35:01 UTC 2015


In ghci you want to make a multi-line expression:

:{
let digs 0 =[0] 
    digs x = (digs (x `div` 10)) ++ [(x `rem` 10)] 
:}

(Note we don't put "let" on the second line)

tom


> El 13 nov 2015, a las 01:47, akash g <akaberto at gmail.com> escribió:
> 
> let digs 0 =[0] 
> let digs x = (digs (x `div` 10)) ++ [(x `rem` 10)]


More information about the Beginners mailing list