On 21 Feb 2015 07:57, "Keean Schupke" <[email protected]> wrote: > > >> And then what happens when you call the HOF with a function that's a >> subtype of the one it expects? > > > Thats okay because you can always call with more arguments. >
I think my explanation is wrong :-) its not that you can call with more arguments, which is wrong because you will have less arguments when it is applied. It that the application defines the concrete type so we specialise the higher order function according to the type passed, and this is always making is less curried. If the HOF is imported the function argument can be specialised to match the required concrete type. If the function argument is imported the HOF is specialised to match the argument arity. If both are imported the concrete arities must match. Hopefully that explains it better. I posted a typing for your example a few posts back that is probably better than my attempts to explain it. Keean.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
