Hacker News new | past | comments | ask | show | jobs | submit login

One of the things haskell can do with lazy sequences is fuse away intermediate data structures, e.g. take

  map f . map g
and substitute

  map (f . g)
automatically (as a compiler optimization). I don't think that's a safe transformation in general in a non-pure language; not sure about a pure strict language.



yes, that's possible in a pure referential transparent language (strict or lazy is not the point).




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: