Instead, I make that function using "".
I wont to get current time for a seed.
But I couldn't a function for it.
(define (rand seed)
(let ((x seed))
(lambda ()
(set! x (remainder (+ (* 13 x) 5) 24))
x)))
(define a (rand 1))
(display (a))
(newline)
(display (a))
(newline)
(display (a))
(newline)
18
23
16
No comments:
Post a Comment