+ { $code "ENUM: tv_peripherals_4 < uint"
+ "{ appletv 1 } { chromecast 2 } { roku 4 } ;"
+ }
+ $nl
+ "We can define a generic and dispatch on it:"
+ { $code "ENUM: tv_peripherals_4 < uint"
+ "{ appletv 1 } { chromecast 2 } { roku 4 } ;"
+ ""
+ "GENERIC: watch-device ( device -- )"
+ "M: appletv watch-device drop \"watching appletv\" print ;"
+ "M: chromecast watch-device drop \"watching chromecast\" print ;"
+ ""
+ "appletv watch-device"
+ }