cons : 'a -> 'a list -> 'a list
In some programming situations it is convenient to use the cons operation in a curried form. Although it is easy to code up on demand, the cons function is provided for convenience.
- map (cons 1) [[],[2],[2,3]]; > val it = [[1], [1, 2], [1, 2, 3]] : int list list