Paste: an oddity

Author: mncharity
Mode: factor
Date: Fri, 9 Jul 2010 00:11:43
Plain Text |
IN: oddity
USING: kernel prettyprint ;
TUPLE: Ca ;
TUPLE: Cb < Ca ;
TUPLE: Cx ;
MIXIN: Cam
MIXIN: Cbm
MIXIN: Cxm
INSTANCE: Ca Cam
INSTANCE: Cb Cbm
INSTANCE: Cx Cxm

INSTANCE: Cbm Cxm

GENERIC: ms ( a -- b )
M: Cam ms drop "sa" ;
M: Cxm ms drop "sx" ;

: f ( -- o ) Cb new ms ;
Cb new ms .  ! => "sx"
f .          ! => "sa"

New Annotation

Summary:
Author:
Mode:
Body: