46

Carbon

 6 years ago
source link: https://dawnlabs.io/carbon
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Create and share beautiful images of your source code.Start typing or drop a file into the text area to get started.

Theme
Language
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, [])
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK