[plt-scheme] for comprehensions in typed-scheme

From: Sam TH (samth at ccs.neu.edu)
Date: Mon Jun 8 10:13:13 EDT 2009

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

(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

Posted on the users mailing list.