Better method usages work in progres

db4
Slava Pestov 2008-02-04 19:43:10 -06:00
parent 2872bc9d30
commit 77a2a2136a
1 changed files with 10 additions and 0 deletions
core/generic

View File

@ -134,3 +134,13 @@ M: assoc update-methods ( assoc -- )
dupd define-default-method
make-generic
] if ;
: subwords ( generic -- seq )
dup "methods" word-prop values
swap "default-method" word-prop add
[ method-word ] map ;
: xref-generics ( -- )
all-words
[ generic? ] subset
[ subwords [ xref ] each ] each ;