I think I've run into this problem before. The type of array-slice-ref is
(Array A) (Listof Slice-Spec) -> (Array A)
where Slice-Spec = (U (Sequenceof Integer) Integer )
The problem is that integers are also sequences, so the contract
generated for Slice-Spec just discards the Integer p
When using array-slice-ref from math/array I get different results when
executing it #lang typed/racket or #lang racket (see below). The typed/racket
result is consistent with the documentation, the untyped one seems to be wrong.
Berthold
#lang typed/racket
(require math/array)
(define arr
2 matches
Mail list logo