Created
November 10, 2017 16:55
-
-
Save rjhilgefort/7ed52affca8348023703d8250e1e503e 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
// NOTE: Ramda repl | |
console.clear() | |
const foo = (a, b) => a + b | |
const bar = () => 4 | |
const tryYolo = curry((func, params) => { | |
try { | |
return apply(func, params) | |
} catch (e) {} | |
}) | |
console.log( | |
tryYolo(JSON.parse, ['{ "foo": "bar", "baz": 3 }']), | |
tryYolo(foo, [1, 2]), | |
tryYolo(bar, null) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment