3 ms·
jax has nice e2 = e.at[lbl].set(value) syntax, and Ramda has e2 = assoc(lbl, value, e) which is curried and data-last, so you can keep that setter around fo
by bionhoward 6y ago
jax has nice
e2 = e.at[lbl].set(value)
syntax, and Ramda has
e2 = assoc(lbl, value, e)
which is curried and data-last, so you can keep that setter around for future instances of e. Usually not too bad to translate Ramda into your language of choice, and a valuable exercise. I did it with Python and it helped a TON
Once JS gets immutables, web devs will have more tools for FP, and we can look forward to that expanding the community of functional programmers a lot: (https://www.infoworld.com/article/3569118/ecma-proposal-would-bring-records-and-tuples-to-javascript.html https://www.infoworld.com/article/3569118/ecma-proposal-woul...)
Python’s lack of an immutable map is annoying but there are nice pip packages for it