{ 5 } [
"hello factor!" { [ split-words ] [ first ] [ length ] } chain
] unit-test
+
+{
+ { 1 2 3 4 }
+ { 1 2 3 4 }
+ { 1 2 3 4 }
+ { 1 2 3 4 }
+} [
+ 1 2 3 4
+ [ 4array ] [ 4array ] [ 4array ] [ 4array ] 4quad
+] unit-test
+
+{
+ { 1 2 3 4 }
+ { 5 6 7 8 }
+ { 9 10 11 12 }
+} [
+ 1 2 3 4 5 6 7 8 9 10 11 12
+ [ 4array ] [ 4array ] [ 4array ] 4tri*
+] unit-test
+
+{
+ { 1 2 3 4 }
+ { 5 6 7 8 }
+ { 9 10 11 12 }
+} [
+ 1 2 3 4 5 6 7 8 9 10 11 12
+ [ 4array ] 4tri@
+] unit-test
\ No newline at end of file
: 4bi* ( s t u v w x y z p q -- )
[ 4dip ] dip call ; inline
-: 4bi@ ( s t u v w x y z quot -- )
+: 4tri* ( o p q r s t u v w x y z p q r -- )
+ [ 8 ndip ] 2dip
+ [ 4dip ] dip
+ call ; inline
+
+: 4bi@ ( s t u v w x y z quot -- )
dup 4bi* ; inline
-: 4tri ( w x y z p q r -- )
+: 4tri@ ( a b c d e f g h i j k l quot -- )
+ dup dup 4tri* ; inline
+
+: 4tri ( w x y z p q r -- )
[ [ 4keep ] dip 4keep ] dip call ; inline
+: 4quad ( w x y z p q r s -- )
+ [ [ [ 4keep ] dip 4keep ] dip 4keep ] dip call ; inline
+
: plox ( ... x/f quot: ( ... x -- ... y ) -- ... y/f )
dupd when ; inline