RosettaCodeData/Task/Constrained-genericity/J/constrained-genericity-1.j

15 lines
201 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
coclass'Connoisseur'
isEdible=:3 :0
0<nc<'eat__y'
)
coclass'FoodBox'
create=:3 :0
collection=: 0#y
)
add=:3 :0"0
2016-12-05 22:15:40 +01:00
'inedible' assert isEdible_Connoisseur_ y
2013-04-10 21:29:02 -07:00
collection=: collection, y
2016-12-05 22:15:40 +01:00
EMPTY
2013-04-10 21:29:02 -07:00
)