Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add useful "flatten" function.

  • Loading branch information...
commit 47cb655ecc4596a3123564a1996ca7d8d55e2103 1 parent e02e174
@jpr5 jpr5 authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 .emacs.d/util.el
View
6 .emacs.d/util.el
@@ -30,5 +30,7 @@
(set-frame-parameter nil 'fullscreen
(if (frame-parameter nil 'fullscreen)
nil
- 'fullboth)
- ))
+ 'fullboth)))
+;; Take any list-of-list(-of-list) and return a flat list.
+(defun flatten (list)
+ (mapcan (lambda (x) (if (listp x) x nil)) list))
Please sign in to comment.
Something went wrong with that request. Please try again.