Skip to content

Instantly share code, notes, and snippets.

@b1rdex
Created May 22, 2013
Embed
What would you like to do?
hoa math condition functions
// defining hoa functions
'if' => xcallable(function($condition, $than, $else) {
return $condition ? $than : $else;
}),
'lt' => xcallable(function($left, $right) {
return $left < $right;
}),
'gt' => xcallable(function($left, $right) {
return $left > $right;
}),
'eq' => xcallable(function($left, $right) {
return $left == $right;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment