Page 1 of 1

Equal and Not Equal

Posted: Tue Jun 04, 2019 12:57 pm
by cameyo

Code: Select all

(setq lst '((2 4) (3 1)))

(= (lst 0 0) (lst 0 0))
;-> true

(!= (lst 0 0) (lst 0 0))
;-> (nil nil)

(= (lst 0 0) (lst 1 0))
;-> (nil nil)

(= (first (first lst)) (last (first lst)))
;-> (nil nil)
I was expecting nil, instead i got (nil nil).
Where am I doing wrong?
Thanks.

Re: Equal and Not Equal

Posted: Tue Jun 04, 2019 1:18 pm
by cameyo
After starting a new newLISP REPL...all works ok :-)
It is not the first time that I get strange results after using the debugger.
I'd like to have a command/method to test the integrity/correctness of current REPL session.
cameyo