Better word comparison

slava 2006-05-19 02:02:20 +00:00
parent e0a875bc6b
commit 062dd4a1aa
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,12 @@ IN: words
USING: errors graphs hashtables kernel kernel-internals USING: errors graphs hashtables kernel kernel-internals
math namespaces sequences strings vectors ; math namespaces sequences strings vectors ;
M: word <=> [ word-name ] 2apply <=> ; M: word <=>
2dup [ word-vocabulary ] 2apply <=> dup zero? [
drop [ word-name ] 2apply <=>
] [
2nip
] if ;
GENERIC: definer ( word -- word ) GENERIC: definer ( word -- word )