git.fiddlerwoaroof.com
Browse code

feat(emacs): add some useful functional utilities

Edward authored on 13/04/2021 06:07:59
Showing 1 changed files
... ...
@@ -111,6 +111,10 @@
111 111
   (lambda (it)
112 112
     (elt it num)))
113 113
 
114
+(fwoar/def-ns-fun hash-lookup (ht)
115
+  (lambda (key)
116
+    (gethash key ht)))
117
+
114 118
 (cl-defgeneric fwoar/extract-key (map key)
115 119
   (:method ((map hash-table) key)
116 120
            (gethash key map))
... ...
@@ -153,5 +157,7 @@
153 157
                      (apply f args))
154 158
                    r))))
155 159
 
160
+(defalias 'fwoar/• '-compose)
161
+
156 162
 (provide 'fwoar-functional-utils)
157 163
 ;;; fwoar-functional-utils.el ends here