function - Haskell - type classes -


i new haskell, , trying learn how type classes work. typed following code ghci compiler.

let (+) :: num => -> -> a; (+) b = a+b; 

the code compiles, whenever call function, stuck , have ctrl+c stop process.

am doing wrong here? thank in advance!

you calling function + function + recursively, it's same if wrote:

add :: num => -> -> add b = add b 

Comments

Popular posts from this blog

python 2.7 - Chat Solution for Mobile App -

jquery - Detect current Section with javascript -