Created
December 23, 2018 06:23
-
-
Save rjhilgefort/93ca0c9e6b51ec6b573516a1ea640d9f to your computer and use it in GitHub Desktop.
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 evolveAll = spec => compose( | |
evolve(spec), | |
compose(pickAll, keys)(spec), | |
) | |
const maybeHof = compose(when, complement)(isNil) | |
const maybeToUpper = maybeHof(toUpper) | |
evolveAll({ | |
foo: maybeToUpper, | |
bar: maybeToUpper, | |
})({ | |
foo: 'foo', | |
}) | |
// {"bar": undefined, "foo": "FOO"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment