2Elm.Native.Random.make = function(elm) {
4 elm.Native = elm.Native || {};
5 if (elm.Native.Random) return elm.Native.Random;
7 var Signal = Elm.Signal.make(elm);
9 function range(min, max, signal) {
10 function f(x) { return Math.floor(Math.random() * (max-min+1)) + min; }
11 return A2( Signal.lift, f, signal );
14 function flt(signal) {
15 function f(x) { return Math.random(); }
16 return A2( Signal.lift, f, signal );
19 elm.Native.Random = { range: F3(range) };
20 elm.Native.Random['float'] = flt;
21 return elm.Native.Random;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list