unboxer ( error-quot word types type -- quot )


Vocabulary
typed.private

Inputs
error-quotan object
wordan object
typesan object
typean object


Outputs
quotan object


Definition


:: unboxer ( error-quot word types type -- quot )
type word? [ type "coercer" word-prop ] [ f ] if [ ] or
type type word types error-quot 3curry
[ [ [ dup ] ] dip [ instance? ] curry compose ] dip
[ unless ] curry compose type (unboxer) compose compose ;