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 - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -