Skip to content

Instantly share code, notes, and snippets.

@beaucharman beaucharman/example.js
Last active Feb 4, 2019

Embed
What would you like to do?
A conditional higher order function
unless(booleanExpression, () => {
// Then callback
})
function unless(predicate, then) {
if (!predicate) {
then()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.