Last active
April 12, 2016 21:08
-
-
Save nicoespeon/b2770bb0764a6cadd87b7e23253879dc to your computer and use it in GitHub Desktop.
Blog - Achieving point-free JavaScript - naive solution
This file contains hidden or 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 {pipe, prop, head, last} from 'ramda'; | |
| import {daysSpent} from './utils/dates'; | |
| // leadTime : [{date: Date}] -> Number | |
| const leadTime = (items) => daysSpent( | |
| pipe( head, prop('date') )(items), | |
| pipe( last, prop('date') )(items) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment