The interpreter does not always pass fresh rest argument lists, leading to unexpected behavior:
--8<---------------cut here---------------start------------->8--- 1:=> (module foo (library srfi1)) #unspecified 1:=> (define (foo . args) (apply circular-list args) args) foo 1:=> (foo 1 2 3) (1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 ... --8<---------------cut here---------------end--------------->8--- ‘circular-list’ should be working on a fresh list, so that ‘foo’ would return (1 2 3) (info "(r5rs) Procedures"). Thanks, Ludo’.
