equal: nil equals nil

This commit is contained in:
madmaurice 2021-04-10 22:35:50 +02:00
parent 19de2ff4e8
commit 97d472bf6a

View file

@ -199,7 +199,11 @@ sub lisp_format {
sub lisp_equal {
my ($a, $b) = @_;
if ( ref($a) eq "ARRAY" && ref($b) eq "ARRAY" )
if ( !defined($a) && !defined($b) )
{
return LISP_TRUE;
}
elsif ( ref($a) eq "ARRAY" && ref($b) eq "ARRAY" )
{
return LISP_FALSE unless scalar(@$a) == scalar(@$b);