Bahman Movaqar writes: > I have a record type, SOME-RT, and am implementing operations for it. As > a habit, I keep putting an 'assert' expression at the beginning of each > procedure. > > (define (some-rt-some-op param1) > (assert (some-rt? param1) ...) > > However, I doubt if I'm doing things the idiomatic way. Is this the > approach you seasoned CHICKEN'ers would take as well? TIA,
While I wouldn’t say assert is in any way a bad thing to use, Eiffel-style contracts can be a nice solution to this type of problem. While I’ve never used the dbc egg before, it seems to be the way to go for contracts in CHICKEN: http://wiki.call-cc.org/eggref/4/dbc -- Alex _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users