Skip to content

Instantly share code, notes, and snippets.

@DrBoolean
Created July 20, 2017 16:59
Show Gist options
  • Save DrBoolean/ead14c8c07dc17da47608b8934bd5f45 to your computer and use it in GitHub Desktop.
Save DrBoolean/ead14c8c07dc17da47608b8934bd5f45 to your computer and use it in GitHub Desktop.
rep6
const Components = [‘alert’, ‘buttons’, ‘data-tables’, /* …etc */]
// from :: (Component -> a) -> UI
const from = f =>
 Components.reduce((ui, key) => ui.set(key, f(key)), Immutable.Map())
// to :: UI -> (Component -> a)
const to = structure =>
 key => structure.get(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment