Skip to content

Robertino10/developer-roadmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

developer-roadmap

const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)

const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)

const unfold = (f, seed) => {

const go = (f, seed, acc) => {

const res = f(seed)

return res ? go(f, res[1], acc.concat([res[0]])) : acc

}

return go(f, seed, [])

}