Skip to content

Instantly share code, notes, and snippets.

@nicoespeon
Last active April 12, 2016 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoespeon/aa64f3a5852820238143d89a0a740270 to your computer and use it in GitHub Desktop.
Save nicoespeon/aa64f3a5852820238143d89a0a740270 to your computer and use it in GitHub Desktop.
Blog - Achieving point-free JavaScript - ramda
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