#1774·ramda

Deprecate juxt?

Author: asaf-romanoCreated May 20, 2016Updated May 8, 2024
Labels1.0 discussion

I juxt realized:

javascript
applySpec([inc, dec])(1); // => [2, 0]

For arrays, the only difference between juxt and applySpec is that the later is recursive; meaning that one can do something like this:

javascript
applySpec([[inc, dec], [multiply(2), divide(__, 2)]])(10); // => [[11, 9], [20, 5]]

Somewhat shocked that all of this wasn't intentional.