Created
July 20, 2017 16:59
-
-
Save DrBoolean/ead14c8c07dc17da47608b8934bd5f45 to your computer and use it in GitHub Desktop.
rep6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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