←back to thread

296 points gyre007 | 1 comments | | HN request time: 0.339s | source
Show context
onion2k ◴[] No.21280617[source]
JavaScript isn't a functional language itself, but you can use a functional library like lodash/fp (https://github.com/lodash/lodash/wiki/FP-Guide) on top of it to get all that lovely functional goodness in your frontend and node code. Using lodash/fp has made my frontend state management code a lot nicer, and I'm really only just starting out with it.
replies(4): >>21280640 #>>21280696 #>>21280761 #>>21281273 #
Tade0 ◴[] No.21280696[source]
You may want to consider Ramda.js instead: https://ramdajs.com/

IMHO does a better job than Lodash, because:

1. All functions are automatically curried.

2. The order of parameters lends itself to composition.

EDIT: 3. Transducers.

replies(3): >>21280709 #>>21280791 #>>21281336 #
1. slifin ◴[] No.21280709[source]
3. transducers