]> gitweb.factorcode.org Git - factor-unmaintained.git/blobdiff - 4DNav/deep/deep.factor
unmaintained: New home for misfit Factor vocabularies.
[factor-unmaintained.git] / 4DNav / deep / deep.factor
diff --git a/4DNav/deep/deep.factor b/4DNav/deep/deep.factor
new file mode 100644 (file)
index 0000000..f37bcf0
--- /dev/null
@@ -0,0 +1,13 @@
+USING: macros quotations math math.functions math.trig 
+sequences.deep kernel make fry combinators grouping ;
+IN: 4DNav.deep
+
+! USING: bake ;
+! MACRO: deep-cleave-quots ( seq -- quot )
+!    [ [ quotation? ] deep-filter ]
+!    [ [ dup quotation? [ drop , ] when ] deep-map ]
+!    bi '[ _ cleave _ bake ] ;
+
+: make-matrix ( quot width -- matrix ) 
+    [ { } make ] dip group ; inline
+