Last active
April 12, 2016 21:07
-
-
Save nicoespeon/aa64f3a5852820238143d89a0a740270 to your computer and use it in GitHub Desktop.
Blog - Achieving point-free JavaScript - ramda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {converge, pipe, prop, head, last} from 'ramda'; | |
import {daysSpent} from './utils/dates'; | |
// leadTime : [{date: Date}] -> Number | |
const leadTime = converge( | |
daysSpent, | |
[ pipe( head, prop('date') ), pipe( last, prop('date') ) ] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment