66e02df8c0b3

Minor cleanup
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 20 Sep 2016 15:34:32 +0000
parents 6aec014eb591
children 8f9411271fd7
branches/tags (none)
files losh.lisp package.lisp

Changes

--- a/losh.lisp	Mon Sep 19 23:57:56 2016 +0000
+++ b/losh.lisp	Tue Sep 20 15:34:32 2016 +0000
@@ -20,21 +20,21 @@
 (defconstant tau (* pi 2)) ; fuck a pi
 
 (defconstant tau/2 (* tau 1/2))
-(defconstant 1tau/2 (* tau 1/2))
+(defconstant 1/2tau (* tau 1/2))
 
 (defconstant tau/4 (* tau 1/4))
-(defconstant 1tau/4 (* tau 1/4))
-(defconstant 2tau/4 (* tau 2/4))
-(defconstant 3tau/4 (* tau 3/4))
+(defconstant 1/4tau (* tau 1/4))
+(defconstant 2/4tau (* tau 2/4))
+(defconstant 3/4tau (* tau 3/4))
 
 (defconstant tau/8 (* tau 1/8))
-(defconstant 1tau/8 (* tau 1/8))
-(defconstant 2tau/8 (* tau 2/8))
-(defconstant 3tau/8 (* tau 3/8))
-(defconstant 4tau/8 (* tau 4/8))
-(defconstant 5tau/8 (* tau 5/8))
-(defconstant 6tau/8 (* tau 6/8))
-(defconstant 7tau/8 (* tau 7/8))
+(defconstant 1/8tau (* tau 1/8))
+(defconstant 2/8tau (* tau 2/8))
+(defconstant 3/8tau (* tau 3/8))
+(defconstant 4/8tau (* tau 4/8))
+(defconstant 5/8tau (* tau 5/8))
+(defconstant 6/8tau (* tau 6/8))
+(defconstant 7/8tau (* tau 7/8))
 
 
 (defun-inline degrees (radians)
@@ -803,13 +803,11 @@
 
   "
   (let ((kwd (if generate 'generate 'for)))
-    (with-gensyms (s seq len idx)
+    (with-gensyms (seq len idx)
       `(progn
         (with ,len = nil)
         (with ,idx = nil)
-        (generate ,seq :in (iterate (for ,s :in-sequence ,seqs)
-                                    (unless (emptyp ,s)
-                                      (collect ,s))))
+        (generate ,seq :in-whatever (remove-if #'emptyp ,seqs))
         (,kwd ,var next
          (progn
            (when (seq-done-p ,seq ,len ,idx)
--- a/package.lisp	Mon Sep 19 23:57:56 2016 +0000
+++ b/package.lisp	Tue Sep 20 15:34:32 2016 +0000
@@ -24,19 +24,19 @@
   (:export
     #:tau
     #:tau/2
-    #:1tau/2
+    #:1/2tau
     #:tau/4
-    #:1tau/4
-    #:2tau/4
-    #:3tau/4
+    #:1/4tau
+    #:2/4tau
+    #:3/4tau
     #:tau/8
-    #:1tau/8
-    #:2tau/8
-    #:3tau/8
-    #:4tau/8
-    #:5tau/8
-    #:6tau/8
-    #:7tau/8
+    #:1/8tau
+    #:2/8tau
+    #:3/8tau
+    #:4/8tau
+    #:5/8tau
+    #:6/8tau
+    #:7/8tau
 
     #:radians
     #:degrees