I\'m struggling with the F# type signature notation. For example let\'s say you have a Fold function:
let rec Fold combine acc l =
...
that may
The signatures are written in that way because of what is called Currying. A slightly more accurate way of describing your function is that it takes a (function that takes a 'a
and returns a function from a 'b
to a 'a
) and returns a function that takes a 'a
and returns a function from a list<'b>
to a 'a
. Because of this the type signature can be rewritten as
('a -> 'b -> 'a) -> ('a -> (list<'b> -> 'a))