From 2d19b386839095f66ad3f9895b629bdbb1ac1c33 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 30 Mar 2008 00:40:43 -0500 Subject: [PATCH] Documentation fixes --- core/combinators/combinators-docs.factor | 2 +- core/combinators/combinators.factor | 6 +++--- core/kernel/kernel.factor | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/combinators/combinators-docs.factor b/core/combinators/combinators-docs.factor index b088979b4e..f497fd20e5 100755 --- a/core/combinators/combinators-docs.factor +++ b/core/combinators/combinators-docs.factor @@ -45,7 +45,7 @@ HELP: cleave { bi tri cleave } related-words HELP: spread -{ $values { "obj..." "objects" } { "seq" "a sequence of quotations with stack effect " { $snippet "( x -- ... )" } } } +{ $values { "objs..." "objects" } { "seq" "a sequence of quotations with stack effect " { $snippet "( x -- ... )" } } } { $description "Applies each quotation to the object in turn." } { $examples "The " { $link bi* } " combinator takes two values and two quotations; the " { $link tri* } " combinator takes three values and three quotations. The " { $link spread } " combinator takes " { $snippet "n" } " values and " { $snippet "n" } " quotations, where " { $snippet "n" } " is the length of the input sequence, and is essentially equivalent to series of retain stack manipulations:" diff --git a/core/combinators/combinators.factor b/core/combinators/combinators.factor index cc03955fd8..e19847dbd4 100755 --- a/core/combinators/combinators.factor +++ b/core/combinators/combinators.factor @@ -5,13 +5,13 @@ USING: arrays sequences sequences.private math.private kernel kernel.private math assocs quotations vectors hashtables sorting ; -: cleave ( obj seq -- ) +: cleave ( x seq -- ) [ call ] with each ; : cleave>quot ( seq -- quot ) [ [ keep ] curry ] map concat [ drop ] append ; -: 2cleave ( obj seq -- ) +: 2cleave ( x seq -- ) [ [ call ] 3keep drop ] each 2drop ; : 2cleave>quot ( seq -- quot ) @@ -22,7 +22,7 @@ hashtables sorting ; [ [ [ r> ] prepend ] map concat ] bi append ; -: spread ( seq -- ) +: spread ( objs... seq -- ) spread>quot call ; ERROR: no-cond ; diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 70b591e5cf..ab42a1b903 100755 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -98,14 +98,14 @@ DEFER: if >r -rot 2slip r> call ; inline ! Appliers -: bi@ ( x y p -- ) +: bi@ ( x y quot -- ) tuck 2slip call ; inline -: tri@ ( x y z p -- ) +: tri@ ( x y z quot -- ) tuck >r bi@ r> call ; inline ! Double appliers -: 2bi@ ( w x y z p -- ) +: 2bi@ ( w x y z quot -- ) dup -roll 3slip call ; inline : while ( pred body tail -- )