mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 04:43:25 +03:00
remove a couple of trailing where
s
This commit is contained in:
parent
c8e4210289
commit
2fc589aa76
@ -19,12 +19,12 @@ Random Int where
|
|||||||
let maxInt = shiftL 1 31 - 1 in
|
let maxInt = shiftL 1 31 - 1 in
|
||||||
let minInt = negate $ shiftL 1 31 in
|
let minInt = negate $ shiftL 1 31 in
|
||||||
let range = maxInt - minInt in
|
let range = maxInt - minInt in
|
||||||
map (+ minInt) $ prim_randomInt range where
|
map (+ minInt) $ prim_randomInt range
|
||||||
|
|
||||||
-- Generate a random value within [lo, hi].
|
-- Generate a random value within [lo, hi].
|
||||||
randomRIO (lo, hi) =
|
randomRIO (lo, hi) =
|
||||||
let range = hi - lo + 1 in
|
let range = hi - lo + 1 in
|
||||||
map (+ lo) $ prim_randomInt range where
|
map (+ lo) $ prim_randomInt range
|
||||||
|
|
||||||
prim_randomDouble : IO Double
|
prim_randomDouble : IO Double
|
||||||
prim_randomDouble = schemeCall Double "blodwen-random" []
|
prim_randomDouble = schemeCall Double "blodwen-random" []
|
||||||
|
Loading…
Reference in New Issue
Block a user