PasteRack.org
Paste # 48395
2016-07-15 12:42:50

Forked from paste # 83468.

Fork as a new paste.

Paste viewed 315 times.


Embed:

  1. #lang racket
  2.  
  3. (define min -5)
  4. (define max 7)
  5.  
  6. (define (generate)
  7.   (for/list ((i (in-range 3)))
  8.             (for/list ((i (in-range 6)))
  9.                       (+ (random (+ 1 (- max min))) min))))
  10.  
  11. (define r (generate))
  12.  
  13. (for-each displayln r)

=>

(3 -5 -3 3 -4 7)

(-5 -3 5 -4 0 -3)

(7 5 4 7 0 3)