1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 01:28:26 +03:00

step 4: Test that (= (list) ()) is true

In APL, empty arrays have type, and the ≡ function pays attention to
that, so if you're not careful empty lists produced by different means
compare different.  This test detects that by comparing an empty list
produced by "list" with one produced by evaluating an empty list.

My bug was found by a deferrable step 4 test, but the bug should be
non-deferrable.
This commit is contained in:
Ben Harris 2020-05-29 09:35:40 +01:00 committed by Joel Martin
parent 0baa2f6a8b
commit c88a57fb3f

View File

@ -119,6 +119,8 @@
(= (list) (list))
;=>true
(= (list) ())
;=>true
(= (list 1 2) (list 1 2))
;=>true
(= (list 1) (list))