Created
September 13, 2017 08:13
-
-
Save Shuumatsu/a0c424cfbbf2ede6b7ea0eed04209f1e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { adjust, curryN, length, map } from 'ramda' | |
const globalize = transform => selector => | |
curryN(length(selector), | |
(...args) => selector(...adjust(transform, -1, args)) | |
) | |
export default (localStateTransform, selectors) => | |
map(globalize(localStateTransform), selectors) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment