USING: help.syntax help.markup kernel sequences quotations\r
-math arrays ;\r
+math arrays combinators ;\r
IN: generalizations\r
\r
HELP: nsequence\r
}\r
} ;\r
\r
+HELP: ncleave\r
+{ $values { "quots" "a sequence of quotations" } { "n" integer } }\r
+{ $description "A generalization of " { $link cleave } " and " { $link 2cleave } " that can work for any quotation arity."\r
+} \r
+{ $examples\r
+ "Some core words expressed in terms of " { $link ncleave } ":"\r
+ { $table\r
+ { { $link cleave } { $snippet "1 ncleave" } }\r
+ { { $link 2cleave } { $snippet "2 ncleave" } }\r
+ }\r
+} ;\r
+\r
HELP: mnswap\r
{ $values { "m" integer } { "n" integer } }\r
{ $description "Swaps the top " { $snippet "m" } " stack elements with the " { $snippet "n" } " elements directly underneath." }\r
{ $subsection nslip }\r
{ $subsection nkeep }\r
{ $subsection napply }\r
+{ $subsection ncleave }\r
"Generalized quotation construction:"\r
{ $subsection ncurry } \r
{ $subsection nwith } ;\r