
17 Feb
2015
17 Feb
'15
3:38 a.m.
On Mon, 16 Feb 2015, Greg Weber wrote:
I had an idea whose goal is to ease people into Foldable, Traversable, etc. There could be a notation that shows the generalization that is occurring.
map :: Functor [_] => (a -> b) -> [a] -> [b]
This means that the syntax for the list type is now syntax for the variable created by the Functor constraint.
Btw. there is already a prefix name for the list type constructor, namely '[]'. Thus I think your example would be:
map :: Functor [] => (a -> b) -> [a] -> [b]