[ prog / sol / mona ]

prog


Help on the Way

14 2022-04-08 18:57

>>13
Something like this:

(define (fizzbuzz n)
  (with-output-to-string
    (lambda ()
      (when (zero? (remainder n 5)) (display "fizz"))
      (when (zero? (remainder n 3)) (display "buzz"))
      (when (zero? (port-position (current-output-port))) (display n)))))
103


VIP:

do not edit these