Add more functions: null, evenp and oddp
This commit is contained in:
parent
2c8ce149a6
commit
39d791fcf4
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ my %stdctx = (
|
||||||
print "$e\n";
|
print "$e\n";
|
||||||
return undef;
|
return undef;
|
||||||
},
|
},
|
||||||
|
'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); },
|
'eq' => sub { my ($a, $b) = @_; return ($a eq $b); },
|
||||||
'ne' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
'ne' => sub { my ($a, $b) = @_; return ($a ne $b); },
|
||||||
'==' => sub { my ($a, $b) = @_; return ($a == $b); },
|
'==' => sub { my ($a, $b) = @_; return ($a == $b); },
|
||||||
|
|
Loading…
Reference in a new issue