Skip to content

Instantly share code, notes, and snippets.

@hchbaw
Created June 17, 2010 17:24
Show Gist options
  • Save hchbaw/442429 to your computer and use it in GitHub Desktop.
Save hchbaw/442429 to your computer and use it in GitHub Desktop.
;; http://d.hatena.ne.jp/kitokitoki/20100618/p1
(require 'cl)
(defun* my-tmp (s &optional (sep "\t"))
(destructuring-bind (x y z) (split-string s sep)
(cons (concat x sep y) z)))
(mapcar 'my-tmp '("a\tb\tc" "d\te\tf" "g\th\tk"))
;;⇒ (("a b" . "c") ("d e" . "f") ("g h" . "k"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment