summaryrefslogtreecommitdiff
path: root/exercism/emacs-lisp/acronym/acronym.el
blob: 8c6a6283ded94e4727626140dce150bfa3779f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; acronym.el --- Acronym (exercism)

;;; Commentary:

;;; Code:

(require 'cl-lib)

(defun kj/abbrev-word (w)
  (upcase (substring w 0 1)))

(defun acronym (str)
  (mapconcat 'kj/abbrev-word (split-string str "\\W+" t) ""))

(provide 'acronym)
;;; acronym.el ends here