On Apr 15, 2014, at 4:02 PM, Mikko Tiihonen <[email protected]> 
wrote:

> as I dissected the code it became clear to me that my implementation had been 
> far from clean. One of the problems was that the responsibility for checking 
> return values was not in the function returning the value, but in the calling 
> function.
> 
> The main thing seems to be that I need to check return values for type and 
> also for range. After some refactorings I have transferred the responsibility 
> for checking these values so that testing became easier. Also, It starts to 
> look like typed Racket would be an appropriate solution for making the code 
> more robust.


It sounds like you are reinventing contracts. Are they powerful enough to give 
you what you want? 
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to