Skip to content

Instantly share code, notes, and snippets.

@osune
Created January 4, 2018 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osune/88f900b70c8083457816d3ca834b2cf3 to your computer and use it in GitHub Desktop.
Save osune/88f900b70c8083457816d3ca834b2cf3 to your computer and use it in GitHub Desktop.
(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