Skip to content

Instantly share code, notes, and snippets.

@Shuumatsu
Created September 13, 2017 08:13
Show Gist options
  • Save Shuumatsu/a0c424cfbbf2ede6b7ea0eed04209f1e to your computer and use it in GitHub Desktop.
Save Shuumatsu/a0c424cfbbf2ede6b7ea0eed04209f1e to your computer and use it in GitHub Desktop.
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