@@ -1,16 +1,24 @@
2module Random where
2module Random where
4+{-| Since the core of Elm is pure, randomness must be handled via signals.
4import Signal (Signal)
10import Signal (Signal)
5import Native.Random
11import Native.Random
7−-- Given a range from low to high and a signal of values, this produces
13+{-| Given a range from low to high and a signal of values, this produces
8−-- a new signal that changes whenever the input signal changes. The new
14+a new signal that changes whenever the input signal changes. The new
9−-- values are random number between 'low' and 'high' inclusive.
15+values are random number between 'low' and 'high' inclusive.
10range : Int -> Int -> Signal a -> Signal Int
17range : Int -> Int -> Signal a -> Signal Int
11range = Native.Random.range
18range = Native.Random.range
13−-- Produces a new signal that changes whenever the input signal changes.
20+{-| Produces a new signal that changes whenever the input signal changes.
14−-- The new values are random numbers in [0..1).
21+The new values are random numbers in [0..1).
15float : Signal a -> Signal Float
23float : Signal a -> Signal Float
16float = Native.Random.float
24float = Native.Random.float