[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Greetings



> > The problem is that `cur' might be an empty list, in which case
> > `car' would fail; the inferred type of `cur' is (listof sym), which
> > includes the empty list.  If your loop had a test for null?,
> > MrSpidey might be able to do better.
> 
> Isn't that just a theoretical problem?  As far as I can tell
> there is no possible way for an empty list to ever be bound to cur.

Right, but the inference system used by MrSpidey isn't powerful enough
to conclude that.  Using `null?' in an `if' provides a syntactic hint
that MrSpidey can use to distinguish empty from nonempty lists in the
`if' branches.

-- Paul