It's quite possible that the implementors of the neil/sicp
package chose not to support when
- after all, it's not part of the standard language and (as far as I can remember) it was never mentioned in SICP. But fear not, when
is not essential and you can write something equivalent, just substitute this part:
(when (null? (front-ptr dq))
(set-cdr! dq '()))
With this:
(if (null? (front-ptr dq))
(set-cdr! dq '())
#f)
And if you're feeling bold you can even write your own when
macro, one of the nice things of Scheme is that you can extend its syntax. Left as an exercise for the reader.