]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/shufflers/shufflers-docs.factor
ac372534ae0495383068bf7bfdd40cfe70b7a3d8
[factor.git] / unmaintained / shufflers / shufflers-docs.factor
1 USING: help.syntax help.markup ;
2 IN: shufflers
3
4 HELP: SHUFFLE:
5 { $syntax "SHUFFLE: alphabet #" }
6 { $values { "alphabet" "an alphabet of unique letters" } { "#" "the maximum length" } }
7 { $description "Defines stack shufflers of the form abc-bcba where 'abc' describes the inputs and 'bcba' describes the outputs. Given a stack of 1 2 3, this returns 2 3 2 1. The stack shufflers defined are put in the current vocab with the suffix '.shuffle' appended." }
8 { $examples
9 "SHUFFLE: abcd 6\n"
10 ": 4drop abcd- ;\n"
11 ": 2over abcd-abcdab ;\n"
12 ": 2swap abcd-cdab ;\n"
13 ": 3dup abc-abcabc ;\n" } ;