]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/heaps/heaps-docs.factor
#2845 : Platform specific documentation responders
[factor.git] / basis / heaps / heaps-docs.factor
index 32b6ffe7edeee0632038a1f5c1b1208873e5d019..55deb1317d03db82f026b241c7fee321ace8b777 100644 (file)
@@ -53,49 +53,48 @@ HELP: <max-heap>
 { $description "Create a new " { $link max-heap } "." } ;
 
 HELP: heap-push
-{ $values { "key" "a comparable object" } { "value" object } { "heap" "a heap" } }
+{ $values { "value" object } { "key" "a comparable object" } { "heap" heap } }
 { $description "Push a pair onto a heap. The key must be comparable with all other keys by the " { $link <=> } " generic word." }
 { $side-effects "heap" } ;
 
 HELP: heap-push*
-{ $values { "key" "a comparable object" } { "value" object } { "heap" "a heap" } { "entry" entry } }
+{ $values { "value" object } { "key" "a comparable object" } { "heap" heap } { "entry" entry } }
 { $description "Push a pair onto a heap, and output an entry which may later be passed to " { $link heap-delete } "." }
 { $side-effects "heap" } ;
 
 HELP: heap-push-all
-{ $values { "assoc" assoc } { "heap" "a heap" } }
+{ $values { "assoc" assoc } { "heap" heap } }
 { $description "Push every key/value pair of an assoc onto a heap." }
 { $side-effects "heap" } ;
 
 HELP: heap-peek
-{ $values { "heap" "a heap" } { "key" object } { "value" object } }
+{ $values { "heap" heap } { "value" object } { "key" object } }
 { $description "Output the first element in the heap, leaving it in the heap." } ;
 
 HELP: heap-pop*
-{ $values { "heap" "a heap" } }
+{ $values { "heap" heap } }
 { $description "Remove the first element from the heap." }
 { $side-effects "heap" } ;
 
 HELP: heap-pop
-{ $values { "heap" "a heap" } { "key" object } { "value" object } }
+{ $values { "heap" heap } { "value" object } { "key" object } }
 { $description "Output and remove the first element in the heap." }
 { $side-effects "heap" } ;
 
 HELP: heap-empty?
-{ $values { "heap" "a heap" } { "?" "a boolean" } }
+{ $values { "heap" heap } { "?" boolean } }
 { $description "Tests if a heap has no nodes." } ;
 
 HELP: heap-size
-{ $values { "heap" "a heap" } { "n" integer } }
+{ $values { "heap" heap } { "n" integer } }
 { $description "Returns the number of key/value pairs in the heap." } ;
 
 HELP: heap-delete
-{ $values { "entry" entry } { "heap" "a heap" } }
+{ $values { "entry" entry } { "heap" heap } }
 { $description "Remove the specified entry from the heap." }
 { $errors "Throws an error if the entry is from another heap or if it has already been deleted." }
 { $side-effects "heap" } ;
 
 HELP: slurp-heap
-{ $values
-     { "heap" "a heap" } { "quot" quotation } }
-{ $description "Removes values from a heap and processes them with the quotation until the heap is empty." } ;
+{ $values { "heap" heap } { "quot" { $quotation ( ... value key -- ... ) } } }
+{ $description "Removes entries from a heap and processes them with the quotation until the heap is empty." } ;