{ $notes { $link "ui.gadgets.sliders" } " use range models." } ;\r
\r
HELP: <range>\r
-{ $values { "value" real } { "page" real } { "min" real } { "max" real } { "range" range } }\r
+{ $values { "value" real } { "page" real } { "min" real } { "max" real } { "step" real } { "range" range } }\r
{ $description "Creates a new " { $link range } " model." } ;\r
\r
HELP: range-model\r
}\r
{ $examples \r
{ $example "! Count the number of times an element appears in a sequence."\r
- "USING: prettyprint sets ;"\r
+ "USING: prettyprint histogram ;"\r
"\"aaabc\" histogram ."\r
"H{ { 97 3 } { 98 1 } { 99 1 } }"\r
}\r
}\r
{ $examples \r
{ $example "! Count the number of times the elements of two sequences appear."\r
- "USING: prettyprint sets ;"\r
+ "USING: prettyprint histogram ;"\r
"\"aaabc\" histogram \"aaaaaabc\" histogram* ."\r
"H{ { 97 9 } { 98 2 } { 99 2 } }"\r
}\r
}\r
{ $examples \r
{ $example "! Iterate over a sequence and increment the count at each element"\r
- "USING: assocs prettyprint sets ;"\r
+ "USING: assocs prettyprint histogram ;"\r
"\"aaabc\" [ inc-at ] H{ } sequence>assoc ."\r
"H{ { 97 3 } { 98 1 } { 99 1 } }"\r
}\r
}\r
{ $examples \r
{ $example "! Iterate over a sequence and add the counts to an existing assoc"\r
- "USING: assocs prettyprint sets kernel ;"\r
+ "USING: assocs prettyprint histogram kernel ;"\r
"H{ { 97 2 } { 98 1 } } clone \"aaabc\" [ inc-at ] sequence>assoc* ."\r
"H{ { 97 5 } { 98 2 } { 99 1 } }"\r
}\r
}\r
{ $examples \r
{ $example "! Count the number of times an element occurs in a sequence"\r
- "USING: assocs prettyprint sets ;"\r
+ "USING: assocs prettyprint histogram ;"\r
"\"aaabc\" [ inc-at ] sequence>hashtable ."\r
"H{ { 97 3 } { 98 1 } { 99 1 } }"\r
}\r