moocfi / haskell-mooc

Haskell MOOC University of Helsinki
Other
307 stars 414 forks source link

2.3.1 List Operations: missing `last` #93

Closed eNV25 closed 9 months ago

eNV25 commented 9 months ago
init :: [a] -> [a]          -- returns everything except the last element

init is mentioned but not last.

opqdonut commented 9 months ago

Thanks for noticing that!

muzimuzhi commented 9 months ago

The doc for last introduced in https://github.com/moocfi/haskell-mooc/commit/c196d01e8689f052f01f65a3663b092be3b69ac8 is wrong. Currently it reads "returns everything except the last element" (copied from that for init) but it should be "returns the last element".

opqdonut commented 9 months ago

oof, shouldn't edit the text so late at night