1b8a1cc764c4

Remove -<>
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 29 Nov 2021 23:19:29 -0500
parents 55c796d79111
children a1be2be82e9d
branches/tags (none)
files DOCUMENTATION.markdown src/control-flow.lisp src/debugging.lisp src/math.lisp src/package.lisp

Changes

--- a/DOCUMENTATION.markdown	Wed Nov 10 21:13:00 2021 -0500
+++ b/DOCUMENTATION.markdown	Mon Nov 29 23:19:29 2021 -0500
@@ -360,12 +360,6 @@
 
 Utilities for managing control flow.
 
-### `-<>` (macro)
-
-    (-<> EXPR &REST FORMS)
-
-Thread the given forms, with `<>` as a placeholder.
-
 ### `_` (macro)
 
     (_ EXPR &REST FORMS)
--- a/src/control-flow.lisp	Wed Nov 10 21:13:00 2021 -0500
+++ b/src/control-flow.lisp	Mon Nov 29 23:19:29 2021 -0500
@@ -1,18 +1,5 @@
 (in-package :losh.control-flow)
 
-(defmacro -<> (expr &rest forms)
-  "Thread the given forms, with `<>` as a placeholder."
-  ;; I am going to lose my fucking mind if I have to program lisp without
-  ;; a threading macro, but I don't want to add another dep to this library, so
-  ;; here we are.
-  `(let* ((<> ,expr)
-          ,@(mapcar (lambda (form)
-                      (if (symbolp form)
-                        `(<> (,form <>))
-                        `(<> ,form)))
-                    forms))
-     <>))
-
 (defmacro _ (expr &rest forms)
   "Thread the given forms, with `_` as a placeholder."
   ;; I am going to lose my fucking mind if I have to program lisp without
--- a/src/debugging.lisp	Wed Nov 10 21:13:00 2021 -0500
+++ b/src/debugging.lisp	Mon Nov 29 23:19:29 2021 -0500
@@ -184,10 +184,10 @@
 
   "
   (sb-sprof::reset)
-  (-<> call-count-packages
-    (mapcar #'mkstr <>)
-    (mapcar #'string-upcase <>)
-    (mapc #'sb-sprof::profile-call-counts <>))
+  (_ call-count-packages
+    (mapcar #'mkstr _)
+    (mapcar #'string-upcase _)
+    (mapc #'sb-sprof::profile-call-counts _))
   (sb-sprof::start-profiling :max-samples 50000
                              :mode mode
                              ; :mode :time
--- a/src/math.lisp	Wed Nov 10 21:13:00 2021 -0500
+++ b/src/math.lisp	Mon Nov 29 23:19:29 2021 -0500
@@ -136,8 +136,8 @@
     (digit 1 #xD4 16) ; => 13
 
   "
-  (-<> integer
-    (floor <> (expt base position))
-    (mod <> base)))
+  (_ integer
+    (floor _ (expt base position))
+    (mod _ base)))
 
 
--- a/src/package.lisp	Wed Nov 10 21:13:00 2021 -0500
+++ b/src/package.lisp	Mon Nov 29 23:19:29 2021 -0500
@@ -226,8 +226,6 @@
     :losh.queues)
   (:documentation "Utilities for managing control flow.")
   (:export
-    :-<>
-    :<>
     :_
     :nest
     :recursively