Skip to content

Instantly share code, notes, and snippets.

@yonta
Last active June 13, 2019 07:27
Show Gist options
  • Save yonta/6007b9370918f5bfecdf21f9b65ab410 to your computer and use it in GitHub Desktop.
Save yonta/6007b9370918f5bfecdf21f9b65ab410 to your computer and use it in GitHub Desktop.
Lisp Sort
(let ((a (list 2 1)))
(sort a #'<)
a)
;; => (2)
(let ((a (list 1 2)))
(sort a #'<)
a)
;; => (1 2)
;; ちゃんとsort結果を束縛しような!
(let* ((a (list 2 1))
(b (sort a #'<)))
b)
;; => (1 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment