[plt-scheme] for comprehensions in typed-scheme
On Mon, Jun 8, 2009 at 9:54 AM, Noel Welsh<noelwelsh at gmail.com> wrote:
> All the calls to apply fail with
>
> typecheck: Bad arguments to function in apply:
> Domain: Number Number *
> Arguments: (Listof Number) *
`max' requires at least one argument, and those lists you are
providing might be empty. If you provide one fixed argument, it will
work:
(apply max n l)
This expression, (apply max (list 1 2 3)) works because TS can tell
that that list is non-empty.
--
sam th
samth at ccs.neu.edu