Reorder functions
This commit is contained in:
parent
855f4fef5f
commit
512977011b
1 changed files with 15 additions and 9 deletions
|
@ -105,10 +105,19 @@ my %stdctx = (
|
|||
'null' => sub { my ($a) = @_; return ! defined $a; },
|
||||
'evenp' => sub { my ($a) = @_; return ($a % 2 == 0); },
|
||||
'oddp' => sub { my ($a) = @_; return ($a % 2 != 0); },
|
||||
'eq' => sub { my ($a, $b) = @_; return ($a eq $b); },
|
||||
'ne' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
||||
'==' => sub { my ($a, $b) = @_; return ($a == $b); },
|
||||
'!=' => sub { my ($a, $b) = @_; return ($a != $b); },
|
||||
'eq' => sub { my ($a, $b) = @_; return ($a == $b); },
|
||||
'ne' => sub { my ($a, $b) = @_; return ($a != $b); },
|
||||
'not' => sub { my ($a) = @_; return !$a; },
|
||||
|
||||
# Numeric comparison
|
||||
'=' => sub { my ($a, $b) = @_; return ($a == $b); },
|
||||
'/=' => sub { my ($a, $b) = @_; return ($a != $b); },
|
||||
'>' => sub { my ($a,$b) = @_; return ($a > $b); },
|
||||
'<' => sub { my ($a,$b) = @_; return ($a < $b); },
|
||||
'>=' => sub { my ($a,$b) = @_; return ($a >= $b); },
|
||||
'<=' => sub { my ($a,$b) = @_; return ($a <= $b); },
|
||||
|
||||
# String comparison
|
||||
'string=' => sub { my ($a, $b) = @_; return ($a eq $b); },
|
||||
'string/=' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
||||
'string<' => sub { my ($a, $b) = @_; return ($a lt $b); },
|
||||
|
@ -121,11 +130,8 @@ my %stdctx = (
|
|||
'string-greaterp' => sub { my ($a, $b) = @_; return (lc($a) gt lc($b)); },
|
||||
'string-not-greaterp' => sub { my ($a, $b) = @_; return !(lc($a) gt lc($b)); },
|
||||
'string-not-lessp' => sub { my ($a, $b) = @_; return !(lc($a) lt lc($b)); },
|
||||
'>' => sub { my ($a,$b) = @_; return ($a > $b); },
|
||||
'<' => sub { my ($a,$b) = @_; return ($a < $b); },
|
||||
'>=' => sub { my ($a,$b) = @_; return ($a >= $b); },
|
||||
'<=' => sub { my ($a,$b) = @_; return ($a <= $b); },
|
||||
'not' => sub { my ($a) = @_; return !$a; },
|
||||
|
||||
# Constants
|
||||
't' => 1,
|
||||
'f' => 0,
|
||||
'nil' => undef,
|
||||
|
|
Loading…
Reference in a new issue