Created
December 1, 2023 08:44
-
-
Save prasad83/196d59d6d66bb2a47f6eaabe1ae27f58 to your computer and use it in GitHub Desktop.
LISP - flet* implementation
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
; clisp provides (let and let*) combos however has only (flet). | |
; Using macro we can define flet* as below | |
(defmacro flet* (&rest body) | |
`(labels ,@body)) | |
; example | |
; (print (flet* ((five-times (n) (* n 5)) | |
; (ten-times (n) (* (five-times n) 2))) | |
; (ten-times (b 10))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment