image2text

Untitled

Aug 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. LN
  2. const pluckDeep = key => obj => key.split('."').reduce((accum, key) => accum[key], obj)
  3. const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
  4. const unfold = (f, seed) => {
  5. const go = (f, seed, acc) => {
  6. const res = f(seed)
  7. return res ? go(f, res[1], acc.concat([res[0]])) : acc
  8. I
  9. return go(f, seed, [])
  10. b
Add Comment
Please, Sign In to add comment