Welcome to the CHICKEN Scheme pasting service

do added by megane on Thu Aug 8 13:22:18 2019

(define (>>= m f) (f m))

(define-syntax dodo
  (syntax-rules (<-)
    ((_ exp) exp)
    ((_ var <- exp r ...) (>>= exp (lambda (var) (dodo r ...))))
    ((_ exp r ...) (>>= exp (lambda (_) (dodo r ...))))))

(dodo
 a <- (add1 0)
 (print "a: " a)
 b <- (add1 a)
 (print (list a b)))

;; $ csi -qbn do-syntax.scm 
;; a: 1
;; (1 2)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which one-argument R5RS procedure returns 3 when given `'(1 2 3 4)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV