]> gitweb.factorcode.org Git - factor.git/blob - extra/sequences/abbrev/abbrev-docs.factor
Switch to https urls
[factor.git] / extra / sequences / abbrev / abbrev-docs.factor
1 ! Copyright (C) 2009 Maximilian Lupke.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: assocs help.markup help.syntax sequences ;
4 IN: sequences.abbrev
5
6 HELP: abbrev
7 { $values
8     { "seqs" sequence }
9     { "assoc" assoc }
10 }
11 { $description "Calculates an assoc of { prefix sequence } pairs with prefix being an prefix of each element of sequence for each element in " { $snippet "seqs" } "." } ;
12
13 HELP: unique-abbrev
14 { $values
15     { "seqs" sequence }
16     { "assoc" assoc }
17 }
18 { $description "Calculates an assoc of { prefix { sequence } } pairs with prefix being an unambiguous prefix of sequence in seqs." } ;
19
20 ARTICLE: "sequences.abbrev" "Examples of abbrev usage"
21 "It is probably easiest to just run examples to understand abbrev."
22 { $code
23     "{ \"hello\" \"help\" } abbrev"
24     "{ \"hello\" \"help\" } unique-abbrev"
25 }
26 ;
27
28 ABOUT: "sequences.abbrev"