if-disposed ( ..a disposable quot1: ( ..a -- ..b ) quot2: ( ..a disposable -- ..b ) -- ..b )


Vocabulary
destructors

Inputs
disposablean object
quot1a quotation with stack effect ( ..a -- ..b )
quot2a quotation with stack effect ( ..a disposable -- ..b )


Outputs
None

Definition


: if-disposed
( ..a disposable quot1: ( ..a -- ..b ) quot2: ( ..a disposable -- ..b ) -- ..b )
[ dup disposed>> ] [ [ drop ] prepose ] [ ] tri* if ; inline