FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use recursion to print all elements from a list in emacs lisp · GitHub

Instantly share code, notes, and snippets.

Created June 23, 2022 15:29
Show Gist options
  • Select an option

    Clone this repository at <script src="https://gist.github.com/NSCoder/cf40ed2dbf081fdf2a64ab29138c838f.js"></script>
  • Save NSCoder/cf40ed2dbf081fdf2a64ab29138c838f to your computer and use it in GitHub Desktop.

Select an option

Clone this repository at <script src="https://gist.github.com/NSCoder/cf40ed2dbf081fdf2a64ab29138c838f.js"></script>
Save NSCoder/cf40ed2dbf081fdf2a64ab29138c838f to your computer and use it in GitHub Desktop.
Use recursion to print all elements from a list in emacs lisp
This file contains hidden or 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 ns/print-list (list)
(when list
(print (car list))
(print-list (cdr list))))
(setq coffe-types '(cortado macchiato dopio))
(ns/print-list coffe-types)
;; Output
;; cortado
;; macchiato
;; dopio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Back | FazBrowse Home | New Git URL