From 8a6457d6fca6f9a3af46a3d4549a94706903b35d Mon Sep 17 00:00:00 2001 From: VaclavT Date: Fri, 9 Apr 2021 00:13:41 +0200 Subject: [PATCH] fix nth --- stdlib/stdlib.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/stdlib.lsp b/stdlib/stdlib.lsp index 99fcac0..bb7c223 100644 --- a/stdlib/stdlib.lsp +++ b/stdlib/stdlib.lsp @@ -46,7 +46,7 @@ (defun third (l) (index l 2)) (defun fourth (l) (index l 3)) (defun fifth (l) (index l 4)) -(defun nth (i l) (index l i)) +(defun nth (i l) (index l (- i 1)) ; return 1 when list contains item otherwise 0 (defun member (lst itm)