Using snow 3.1 on my Linux box the following function produces
different results each time I run it on (split1 (string->list
"ab/cd"))
(define (split1 lst)
(cond ((null? lst) '(()))
((eq? (car lst) #\/) (cons () (split1 (cdr lst))))
(else
(let ((sf (split1 (cdr lst))))
(set-car! sf (cons (car lst) (car sf)))
sf))))
If I replace "'(())" with "(list (list))" it works correctly.
--
David Fox http://found.cs.nyu.edu/fox xoF divaD
NYU Media Research Lab fox_at_cs.nyu.edu baL hcraeseR aideM UYN
Received on Thu Oct 17 1996 - 15:57:07 CEST