Jump to content

Loops/Nested: Difference between revisions

Racket
(Racket)
Line 1,430:
for(i in mat[x[1,1],1:x[1,2]]) print(i)
</lang>
 
=={{header|Racket}}==
<lang racket>
#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)
</racket>
 
=={{header|REBOL}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.