 
 : enough? ( stack word -- ? )
     dup deferred? [ 2drop f ] [
-        [ >r length r> 1quotation infer effect-in >= ]
+        [ >r length r> 1quotation infer in>> >= ]
         [ 3drop f ] recover
     ] if ;
 


: constant-word? ( word -- ? )
    stack-effect
    [ effect-out length 1 = ] keep
    effect-in length 0 = and ;

: assure-constant ( constant -- quot )
    dup word? [ "Badly formed math inverse" throw ] when 1quotation ;

    ] recover ; inline

: true-out ( quot effect -- quot' )
    out>> [ ndrop ] curry
    [ t ] 3compose ;

: false-recover ( effect -- quot )
    in>> [ ndrop f ] curry [ recover-fail ] curry ;

: [matches?] ( quot -- undoes?-quot )
    [undo] dup infer [ true-out ] keep false-recover curry ;
