Hi,
I am just learning Scheme, so this is probably my error rather than
Guile's, but the following appears to give inconsistant results:
(define (reduce op nv ls)
(if (null? ls) nv
(op (car ls) (reduce op nv (cdr ls)))))
(define ii '(1 2 3 4 5))
(define bb '(#t #t #f #f))
(display "1. ") (display (reduce + 0 ii)) (newline)
(display "2. ") (display (reduce and #t bb)) (newline)
(display "3. ") (display (reduce + 0 ii)) (newline)
(display "\nShouldn't results 1 and 3 be the same?\n")
I am running: Guile 1.3.4
Slackware 4.0
Kernel 2.2.13
readline 4.0
Regards,
John Fitzgerald.