fork download
  1. #lang racket
  2.  
  3. (define (xorshift seed)
  4. (foldl (lambda (x acc)
  5. (bitwise-xor acc (arithmetic-shift acc x))) seed '(13 -7 17)))
  6.  
  7. (define (main)
  8. (let ((seed (bitwise-xor (current-seconds) 123456789)))
  9. (for-each (lambda (x)
  10. (printf "~a, " x))
  11. (map (lambda (x)
  12. (add1 (modulo x 6)))
  13. (reverse
  14. (foldl (lambda (x v)
  15. (cons (xorshift (car v)) v))
  16. `(,seed) (range 300)))))
  17. (newline)))
Success #stdin #stdout 0.52s 89128KB
stdin
Standard input is empty
stdout
Standard output is empty