Skip to content

Instantly share code, notes, and snippets.

@aaron-em
Created April 7, 2014 02:09
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 aaron-em/10013892 to your computer and use it in GitHub Desktop.
Save aaron-em/10013892 to your computer and use it in GitHub Desktop.
(defun foo-swab (s)
(mapconcat #'(lambda (s)
(if (string= s "0") "1"
"0"))
(split-string s "" t) ""))
(foo-swab "10010")
; => "01101"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment