[plt-scheme] Dependent Contracts for Structures?
Hello all,
Is it possible to create "dependent" contracts (in the spirit of '->d)
for structs in a provide/contract form? I'm thinking something like
(struct matrix
((rows natural-number/c)
(cols natural-number/c)
(elts (vector-of-length/c (* rows cols)))))
When I try this now, I get that 'rows and 'cols are not bound in the
(vector-of-length/c ...) contract. I don't see anything about this in
the documentation for the (struct ...) form in (provide/contract ...).
It's not really strictly necessary, but it would be nice to have....
Thanks!
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: This is a digitally signed message part
URL: <http://lists.racket-lang.org/users/archive/attachments/20090407/46ec5b4e/attachment.sig>