]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/math/transforms/fft/fft.factor
factor: trim using lists
[factor.git] / extra / math / transforms / fft / fft.factor
index b887b55a5345fe405a7caf2624625721dd96dfe2..473960fa6f6e65b9e068978a646b1f43e8f991cc 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (c) 2012 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays kernel locals math math.constants math.functions
-math.vectors sequences sequences.extras sequences.private ;
+USING: kernel math math.constants math.functions
+math.vectors sequences sequences.extras ;
 IN: math.transforms.fft
 
 <PRIVATE
@@ -11,8 +11,8 @@ DEFER: (fft)
 ! Discrete Fourier Transform
 :: (slow-fft) ( seq inverse? -- seq' )
     seq length :> N
-    inverse? 1 -1 ? 2pi * N / N iota n*v :> omega
-    N iota [| k |
+    inverse? 1 -1 ? 2pi * N / N <iota> n*v :> omega
+    N <iota> [| k |
         0 seq omega [ k * cis * + ] 2each
         inverse? [ N / ] when
     ] map ; inline