Created
December 9, 2022 22:53
-
-
Save juan-reynoso/430876b22acaa0e3a85820490cb00a5c 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
;; list to string | |
CL-USER> (map 'string (lambda (x) (char (write-to-string x) 0)) '(1 2 3)) | |
"123" | |
;; string to list | |
CL-USER> (map 'list (lambda (x) (intern (string-upcase (string x)))) "lisp") | |
(L I S P) | |
;; list to vector | |
CL-USER> (map 'vector (lambda (x) x) '( 1 2 3)) | |
#(1 2 3) | |
;; vector to list | |
CL-USER> (map 'list (lambda (x) x) #(1 2 3)) | |
(1 2 3) | |
;; list to a-list | |
CL-USER> (map 'list (lambda (x) (cons (car x) (cadr x))) '((1 "one") (2 "two"))) | |
((1 . "one") (2 . "two"))our code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment