-USING: kernel math sequences namespaces math.primes
-math.functions accessors random ;
+USING: accessors kernel math math.functions math.primes random ;
IN: random.blum-blum-shub
! Blum Blum Shub, n = pq, x_i+1 = x_i ^ 2 mod n
[ find-relative-prime ] keep
blum-blum-shub boa ;
-M: blum-blum-shub random-32* ( bbs -- r )
+M: blum-blum-shub random-32*
0 32 rot
[ next-bbs-bit swap 1 shift bitor ] curry times ;