Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ocaml is immutable. It has ref if you need mutation, this is not the default thing you grab tho. Haskell has unsafe and IORef, that does basically the same thing. Scala, rust etc has all escape hatches.

A loop by itself is not non-fp, as i can do the exact same thing via recursion. Its just syntax.

Hell, i can write a never halting program in lambda calculus with a fixed point combinator causing "undefined behaviour".



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

Search: