aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/math/random.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/math/random.lux')
-rw-r--r--stdlib/source/lux/math/random.lux13
1 files changed, 3 insertions, 10 deletions
diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux
index 91ef541c7..bde9d39c5 100644
--- a/stdlib/source/lux/math/random.lux
+++ b/stdlib/source/lux/math/random.lux
@@ -5,7 +5,6 @@
monad
hash)
(data [bit]
- [char]
[text "Text/" Monoid<Text>]
text/format
[product]
@@ -100,24 +99,18 @@
(Random Deg)
(:: Monad<Random> map real-to-deg real))
-(def: #export char
- (Random Char)
- (do Monad<Random>
- [base nat]
- (wrap (char;char base))))
-
(def: #export (text' char-gen size)
- (-> (Random Char) Nat (Random Text))
+ (-> (Random Nat) Nat (Random Text))
(if (n.= +0 size)
(:: Monad<Random> wrap "")
(do Monad<Random>
[x char-gen
xs (text' char-gen (n.dec size))]
- (wrap (Text/append (char;as-text x) xs)))))
+ (wrap (Text/append (text;from-code x) xs)))))
(def: #export (text size)
(-> Nat (Random Text))
- (text' char size))
+ (text' nat size))
(do-template [<name> <type> <ctor> <gen>]
[(def: #export <name>