
4 Nov
2006
4 Nov
'06
7:02 p.m.
On 11/4/06, Taral
On 11/4/06, Bulat Ziganshin
wrote: Hello libraries,
similar to mapFst and Co, we can define:
-- |Map various parts of list
I don't think this is really that useful. Lists are homogeneous, tuples are heterogeneous.
Hmm, from the first two lines, I was expecting mapHead :: (a -> a) -> [a] -> [a] as given by Bulat, but also mapTail :: ([a] -> [a]) -> [a] -> [a] instead of mapTail :: (a -> a) -> [a] -> [a] I wasn't expecting the other two at all, but I would have expected mapInit to have a similar type to mapTail. (But really, I wouldn't have wanted those. Not that I'm sure I'd want either of the first two.)