Created
May 22, 2013 00:11
-
-
Save b1rdex/5624325 to your computer and use it in GitHub Desktop.
hoa math condition functions
This file contains hidden or 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
// 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