Skip to content

Instantly share code, notes, and snippets.

@b1rdex
Created May 22, 2013 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b1rdex/5624325 to your computer and use it in GitHub Desktop.
Save b1rdex/5624325 to your computer and use it in GitHub Desktop.
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