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; },
|
'null' => sub { my ($a) = @_; return ! defined $a; },
|
||||||
'evenp' => sub { my ($a) = @_; return ($a % 2 == 0); },
|
'evenp' => sub { my ($a) = @_; return ($a % 2 == 0); },
|
||||||
'oddp' => sub { my ($a) = @_; return ($a % 2 != 0); },
|
'oddp' => sub { my ($a) = @_; return ($a % 2 != 0); },
|
||||||
'eq' => sub { my ($a, $b) = @_; return ($a eq $b); },
|
'eq' => sub { my ($a, $b) = @_; return ($a == $b); },
|
||||||
'ne' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
'ne' => sub { my ($a, $b) = @_; return ($a != $b); },
|
||||||
'==' => sub { my ($a, $b) = @_; return ($a == $b); },
|
'not' => sub { my ($a) = @_; return !$a; },
|
||||||
'!=' => sub { my ($a, $b) = @_; return ($a != $b); },
|
|
||||||
|
# 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 eq $b); },
|
||||||
'string/=' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
'string/=' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
||||||
'string<' => sub { my ($a, $b) = @_; return ($a lt $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-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-greaterp' => sub { my ($a, $b) = @_; return !(lc($a) gt lc($b)); },
|
||||||
'string-not-lessp' => sub { my ($a, $b) = @_; return !(lc($a) lt 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); },
|
# Constants
|
||||||
'>=' => sub { my ($a,$b) = @_; return ($a >= $b); },
|
|
||||||
'<=' => sub { my ($a,$b) = @_; return ($a <= $b); },
|
|
||||||
'not' => sub { my ($a) = @_; return !$a; },
|
|
||||||
't' => 1,
|
't' => 1,
|
||||||
'f' => 0,
|
'f' => 0,
|
||||||
'nil' => undef,
|
'nil' => undef,
|
||||||
|
|
Loading…
Reference in a new issue