IN: scratchpad USE: hashtables USE: namespaces USE: generic USE: stack USE: test TRAITS: test-traits C: test-traits ;C [ t ] [ test-traits? ] unit-test [ f ] [ "hello" test-traits? ] unit-test [ f ] [ test-traits? ] unit-test GENERIC: foo M: test-traits foo drop 12 ;M TRAITS: another-test C: another-test ;C M: another-test foo drop 13 ;M [ 12 ] [ foo ] unit-test [ 13 ] [ foo ] unit-test TRAITS: quux C: quux ;C M: quux foo "foo" swap hash ;M [ "Hi" ] [ [ "Hi" "foo" set ] extend foo ] unit-test TRAITS: ctr-test C: ctr-test [ 5 "x" set ] extend ;C [ 5 ] [ [ "x" get ] bind ] unit-test TRAITS: del1 C: del1 ;C GENERIC: super M: del1 super drop 5 ;M TRAITS: del2 C: del2 ( delegate -- del2 ) [ delegate set ] extend ;C [ 5 ] [ super ] unit-test