subtree(users/wpcarro): docking briefcase at '24f5a642'
git-subtree-dir: users/wpcarro git-subtree-mainline:464bbcb15cgit-subtree-split:24f5a642afChange-Id: I6105b3762b79126b3488359c95978cadb3efa789
This commit is contained in:
commit
019f8fd211
766 changed files with 175420 additions and 0 deletions
29
users/wpcarro/emacs/.emacs.d/wpc/>.el
Normal file
29
users/wpcarro/emacs/.emacs.d/wpc/>.el
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
;;; >.el --- Small utility functions -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: William Carroll <wpcarro@gmail.com>
|
||||
;; Version: 0.0.1
|
||||
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
||||
;; Package-Requires: ((emacs "24"))
|
||||
|
||||
;;; Commentary:
|
||||
;; Originally I stored the `>>` macro in macros.el, but after setting up linting
|
||||
;; for my Elisp in CI, `>>` failed because it didn't have the `macros-`
|
||||
;; namespace. I created this module to establish a `>-` namespace under which I
|
||||
;; can store some utilities that would be best kept without a cumbersome
|
||||
;; namespace.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Library
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defmacro >-> (&rest forms)
|
||||
"Compose a new, point-free function by composing FORMS together."
|
||||
(let ((sym (gensym)))
|
||||
`(lambda (,sym)
|
||||
(->> ,sym ,@forms))))
|
||||
|
||||
|
||||
(provide '>)
|
||||
;;; >.el ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue