math.extras: adding docs for majority.

db4
John Benediktsson 2013-03-24 20:14:17 -07:00
parent 872e3c4e83
commit b099cbb1f2
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: help.markup help.syntax math sequences ;
USING: help.markup help.syntax kernel math sequences ;
IN: math.extras
@ -73,3 +73,7 @@ HELP: logspace[a,b)
HELP: logspace[a,b]
{ $values { "a" number } { "b" number } { "length" integer } { "base" number } { "seq" sequence } }
{ $description "Return evenly spaced numbers on a log scaled interval " { $snippet "[base^a,base^b]" } "." } ;
HELP: majority
{ $values { "seq" sequence } { "elt/f" object } }
{ $description "Returns the element of " { $snippet "seq" } " that is in the majority, provided there is such an element, using a linear-time majority vote algorithm." } ;