nested-call ( state q: ( s -- s' ) -- previous-total state' )


Vocabulary
brain-flak.private

Inputs
statean object
qa quotation with stack effect ( s -- s' )


Outputs
previous-totalan object
state'an object


Definition


: nested-call
( state q: ( s -- s' ) -- previous-total state' )
[ [ total>> ] [ 0 >>total ] bi ] dip ( s -- s ) call-effect
; inline