Last active
October 1, 2019 06:27
-
-
Save iamandrewluca/4c9a252034c48dbc4e7f62ea65a907f1 to your computer and use it in GitHub Desktop.
Functional Programming (V4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Din o lista L de atomi afisati toate numerele mai mari ca 11 | |
(DEFUN biggerThan11 (L &OPTIONAL REZ) | |
(COND | |
((NULL L) REZ) | |
((AND (NUMBERP (CAR L)) (> (CAR L) 11)) | |
(biggerThan11 | |
(CDR L) | |
(CONS (CAR L) REZ) | |
) | |
) | |
(T (biggerThan11 (CDR L) REZ)) | |
) | |
) | |
(SETQ L `(A 4 C 1 D 3 23 15 0 Z 99 11 10 12)) | |
(WRITE (biggerThan11 L)) ; (12 99 15 23) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment