Tweak standard-next-method-quot to produce smaller quotations

db4
Slava Pestov 2008-11-28 00:56:54 -06:00
parent b3ad902208
commit c8f227ccf7
1 changed files with 6 additions and 9 deletions

View File

@ -83,15 +83,12 @@ ERROR: no-next-method class generic ;
: single-next-method-quot ( class generic -- quot )
[
[ drop "predicate" word-prop % ]
[
2dup next-method
[ 2nip 1quotation ]
[ [ no-next-method ] 2curry [ ] like ] if* ,
]
[ [ inconsistent-next-method ] 2curry , ]
2tri
\ if ,
2dup next-method [
pick "predicate" word-prop %
1quotation ,
[ inconsistent-next-method ] 2curry ,
\ if ,
] [ [ no-next-method ] 2curry % ] if*
] [ ] make ;
: single-effective-method ( obj word -- method )