graphs: fix stack effect to be more clear on closure.

db4
John Benediktsson 2013-03-24 09:34:05 -07:00
parent 37dea89f2d
commit b39483ec70
2 changed files with 3 additions and 3 deletions

View File

@ -28,5 +28,5 @@ HELP: remove-vertex
{ $side-effects "graph" } ; { $side-effects "graph" } ;
HELP: closure HELP: closure
{ $values { "obj" object } { "quot" { $quotation "( obj -- assoc )" } } { "assoc" "a new assoc" } } { $values { "vertex" object } { "quot" { $quotation "( vertex -- assoc )" } } { "assoc" "a new assoc" } }
{ $description "Outputs a set of all vertices reachable from " { $snippet "vertex" } " via edges given by the quotation. The set always includes " { $snippet "vertex" } "." } ; { $description "Outputs a set of all vertices reachable from " { $snippet "vertex" } " via edges given by the quotation. The set always includes " { $snippet "vertex" } "." } ;

View File

@ -31,7 +31,7 @@ PRIVATE>
<PRIVATE <PRIVATE
: (closure) ( obj assoc quot: ( elt -- assoc ) -- ) : (closure) ( vertex assoc quot: ( vertex -- assoc ) -- )
2over key? [ 2over key? [
3drop 3drop
] [ ] [
@ -41,5 +41,5 @@ PRIVATE>
PRIVATE> PRIVATE>
: closure ( obj quot -- assoc ) : closure ( vertex quot: ( vertex -- assoc ) -- assoc )
H{ } clone [ swap (closure) ] keep ; inline H{ } clone [ swap (closure) ] keep ; inline