Hacker News new | ask | show | jobs
by fredrikholm 266 days ago
In Clojure it's:

  (.-> foo bar baz)
So you might be right in correcting me, it's been a while since I've used another FP language in anger.

With regards to taking the address of foo, pointers are generally not a (user space) concept in FP languages. The compiler/runtime usually optimizes cases like this as passing function pointers is a very large corner stone of FP.

For mutation semantics you often approach it similar to how atomics works in non-FP languages. When opting into mutation you lose one of the pillars of FP which is idempotency and purity via immutability. Treating it as a special case helps scope it down to "here be dragons" areas.