Re: [Factor-talk] Model Validation

2017-06-13 Thread Alexander Ilin
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

Re: [Factor-talk] Model Validation

2017-06-13 Thread John Benediktsson
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