f(+’,1,2) = “cookie”
For one.
Now tell me: are types the best documentation?
For one.
Now tell me: are types the best documentation?
f :: (a -> b -> c) -> b -> a -> c
result in f (+) 1 2
evaluating to "cookie"
? For one, the types (obviously, to me at least) don't work out.You're pattern matching on a number and returning a string. The function might be handed a function and expected to return a file handle for all you know from inside the function.