[plt-scheme] No vector-of-functions contract?

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Jun 13 20:09:55 EDT 2008

On Fri, Jun 13, 2008 at 7:37 PM, Filipe Cabecinhas <filcab at gmail.com> wrote:
> On 13 Jun, 2008, at 23:51, Matthias Felleisen wrote:
>> Vectors are mutable. We don't know how to enforce contracts on mutable
>> compound structures well, so we don't allow it.
> What about if one hammered something like a mutable flag in a vector? One
> would just have to turn it to false when returning it from a function with a
> contract. It's a bit hammered but then you could have vectors and contracts.
> Of course every vector-set! would need an extra if.
>  - Filipe Cabecinhas

See vector-immutableof and vector-immutable/c; we have immutable
vectors, and you can put higher-order contracts on them.

Carl Eastlund

Posted on the users mailing list.