I see. Well, it seems that the original idea was for `set-model` to be generic. Also, there is an undocumented `GENERIC: update-model ( model -- )` - I wonder what is its role in the whole thing. Apparently, `set-model` WAS generic until commit 57893118e066536decc. The documentation is simply out o
I'm not sure what the original author was thinking of, but you can always
do this to perform validation:
TUPLE: my-model < model ;
: ( value -- model ) my-model new-model ;
M: my-model value<<
over even? [ drop throw ] unless call-next-method ;
Then if you try and construct