summaryrefslogtreecommitdiff
path: root/files/practicum/Random.icl
diff options
context:
space:
mode:
Diffstat (limited to 'files/practicum/Random.icl')
-rw-r--r--files/practicum/Random.icl23
1 files changed, 0 insertions, 23 deletions
diff --git a/files/practicum/Random.icl b/files/practicum/Random.icl
deleted file mode 100644
index 2983656..0000000
--- a/files/practicum/Random.icl
+++ /dev/null
@@ -1,23 +0,0 @@
-implementation module Random
-
-import StdInt, StdClass
-import StdTime
-
-:: RandomSeed :== Int
-
-nullRandomSeed :: RandomSeed
-nullRandomSeed
- = 0
-
-getNewRandomSeed :: !*env -> (!RandomSeed, !*env) | TimeEnv env
-getNewRandomSeed env
-# ({hours,minutes,seconds}, env) = getCurrentTime env
-= (1+(hours+minutes+seconds) bitand 65535, env)
-
-random :: !RandomSeed -> .(!Int,!RandomSeed)
-random seed
- = (newSeed,newSeed)
-where
- newSeed = if (nextSeed>=0) nextSeed (nextSeed+65537)
- nextSeed = (seed75 bitand 65535)-(seed75>>16)
- seed75 = seed*75