fix: quasiquoting breaks List.pairs (#1431)

This commit is contained in:
Veit Heller 2022-08-30 15:40:13 +02:00 committed by GitHub
parent d67e4bea4c
commit 0a7a83543d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,7 @@ elements is uneven, the trailing element will be discarded.")
(defndynamic pairs [l]
(if (< (length l) 2)
'()
(cons `(%(car l) %(cadr l)) (List.pairs (cddr l)))))
(cons (list (car l) (cadr l)) (List.pairs (cddr l)))))
(doc nth "gets the nth element of the list `l`.")
(defndynamic nth [l n]