RosettaCodeData/Task/Loops-Nested/Racket/loops-nested.rkt

14 lines
216 B
Racket
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
#lang racket
(define (scan xss)
(for* ([xs xss]
[x xs]
#:final (= x 20))
(displayln x)))
(define matrix
(for/list ([x 10])
(for/list ([y 10])
(+ (random 20) 1))))
(scan matrix)