Skip to content

Instantly share code, notes, and snippets.

@soegaard
Created November 17, 2012 12:47
Show Gist options
  • Save soegaard/4095700 to your computer and use it in GitHub Desktop.
Save soegaard/4095700 to your computer and use it in GitHub Desktop.
Implementation of lc53
#lang racket/base
(define m (- (expt 2 32) 5))
(define a (- (expt 2 32) 333333333))
(define rand
(let ([xn 1])
(λ ()
(set! xn (modulo (* a xn) m))
xn)))
(build-list 20 (λ(+) (rand)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment