Thanks, Matthew.
On Sun, Feb 19, 2012 at 11:50, Matthew Flatt wrote:
> Oops --- I should have tried that program more carefully.
>
> The problem seems to be with `or'. If I change to `if', then the
> example runs as intended:
>
> (define (has-negative? l)
> (if (negative? (car l))
> #t
Oops --- I should have tried that program more carefully.
The problem seems to be with `or'. If I change to `if', then the
example runs as intended:
(define (has-negative? l)
(if (negative? (car l))
#t
(has-negative? (rest l
The `or' from `lazy' effectively adds a `!' aroun
I was reading Matthew Flatt's slides [1] and tried out an example using
#lang lazy that IIUC should run "forever":
;;;
#lang lazy
(define (list-from n)
(cons n (list-from (add1 n
(define (has-negative? l)
(or (negati
3 matches
Mail list logo