First, consider two . He has a signature
two :: Num a => a -> a -> a
forget Num a at the moment (this is only a restriction on a - here you can read Int ). Surely this is also a curry function.
The following is more interesting:
same :: Num a => a -> a
(btw: nice name is the same, but not exactly id ^^)
TBH: I don't know for sure.
The best definition I know about carding function is:
A curried function is a function of N arguments that return another function (N-1) of arguments.
(if you want, you can, of course, extend this to fully traced functions)
This will only match if you define constants as functions with 0 parameters, which you certainly can. Thus, I would say that yes (?) This is also a currency function, but only in the mathematical boundary mode (for example, the sum of 0 numbers is defined as 0)
source share