-
-
Save osune/88f900b70c8083457816d3ca834b2cf3 to your computer and use it in GitHub Desktop.
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
(defun ping-1 (arg) | |
(declare (ignore arg)) | |
"pong") | |
(defun ping-2 (&rest rest) | |
(declare (ignore rest)) | |
"pong") | |
(defun ping-3 () | |
"pong") | |
(defun echo (arg) | |
(format t "you said: ~a" arg)) | |
(defun main-1 (input) | |
(multiple-value-bind (fn-name args) (split-user-input input) | |
(let ((fn (find-fn fn-name))) | |
(if fn | |
(funcall fn args))))) | |
(defun main-2 (input) | |
(multiple-value-bind (fn-name args) (split-user-input input) | |
(let ((fn (find-fn fn-name))) | |
(if fn | |
(if args | |
(funcall fn args) | |
(funcall fn)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment