Thanks Ben The left-pad example is most helpful. Perhaps it could be included in the docs, given that usefully illustrates features of ->i for which no example is given.
I may well have a shot at re-implementing it once I have sufficient machinery set up to support multiple and optional arguments in the kind of style I favor for expressing contracts. Then it will be interesting to see how the readability compares. Thanks also for pointing me to the paper on contracts — time for a re-read! Dan On Wed, May 3, 2017 at 1:57 PM, Ben Greenman <benjaminlgreen...@gmail.com> wrote: > > On Tue, May 2, 2017 at 11:43 PM, Daniel Prager <daniel.a.pra...@gmail.com> > wrote: > >> I kind of expected that it would be possible to do what I wanted with >> "indy" contracts, but struggled with the heavy use of combinators in the >> examples. > > > Two offhand thoughts: > > 1. To practice with dependent contracts, I made a "full" spec for the > JavaScript left-pad function. > https://www.npmjs.com/package/left-pad > > The exercise was fun, I learned a lot, and I think my solution is "as > readable as possible" :) . > https://github.com/bennn/racket-left-pad > > > 2. "Oh Lord, Don't Let Contracts be Misunderstood" implements a little DSL > on top of ->i contracts: http://www.ccs.neu.edu/racket/ > pubs/icfp16-dnff.pdf > > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.