All pastes #30545 Raw Edit

loop

public text v1 · immutable
#30545 ·published 2005-11-23 11:25 UTC
rendered paste body
(letrec
    ((loopx
      (lambda (x-pos)
        (if (< x-pos width)
            (if (loopy x-pos 0)
                #t
                (loopx (+ x-pos 1)))
            #f)))
     (loopy
      (lambda (x-pos y-pos)
        (if (< y-pos height)
            (if (pixels-equal image drawable 0 0 x-pos y-pos)
                #t
                (loopy x-pos (+ y-pos 1)))
            #f))))
  (loopx 0))