[Haskell-cafe] (a -> [b]) -> [a -> b] ?

Joachim Breitner mail at joachim-breitner.de
Mon Dec 4 16:02:39 EST 2006


Hi,

Am Dienstag, den 05.12.2006, 05:59 +1000 schrieb Matthew Brecknell:
> Joachim Breitner:
> > here I use that map (\n -> l !!n ) [1..] == l. I hope that is
> > valid
> 
> map (\n -> l !! n) [1..] is more like (tail l). Did you mean to use
> [0..]?

Probably. I hardly use (!!), so I did not remember if it starts with 0
or 1.

Thanks for the hint,
Joachim


-- 
Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189


More information about the Haskell-Cafe mailing list