aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/math/random.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux/math/random.lux')
-rw-r--r--stdlib/source/documentation/lux/math/random.lux160
1 files changed, 71 insertions, 89 deletions
diff --git a/stdlib/source/documentation/lux/math/random.lux b/stdlib/source/documentation/lux/math/random.lux
index 5a4208538..0e0d88ec9 100644
--- a/stdlib/source/documentation/lux/math/random.lux
+++ b/stdlib/source/documentation/lux/math/random.lux
@@ -1,7 +1,7 @@
(.require
[library
[lux (.except or and nat int rev)
- ["$" documentation (.only documentation:)]
+ ["$" documentation]
[data
["[0]" text (.only \n)
["%" \\format (.only format)]]]
@@ -10,97 +10,11 @@
[\\library
["[0]" /]])
-(documentation: /.PRNG
- "An abstract way to represent any PRNG.")
-
-(documentation: (/.Random it)
- "A producer of random values based on a PRNG.")
-
-(documentation: /.only
- "Retries the generator until the output satisfies a predicate."
- [(only pred gen)])
-
-(documentation: /.one
- ""
- [(one check random)])
-
-(documentation: /.refined
- "Retries the generator until the output can be refined."
- [(refined refiner gen)])
-
-(documentation: /.safe_frac
- "A number in the interval [0.0,1.0].")
-
-(documentation: /.text
- ""
- [(text char_gen size)])
-
-(documentation: /.and
- "Sequencing combinator."
- [(and left right)])
-
-(documentation: /.or
- "Heterogeneous alternative combinator."
- [(or left right)])
-
-(documentation: /.either
- "Homogeneous alternative combinator."
- [(either left right)])
-
-(documentation: /.rec
- "A combinator for producing recursive random generators."
- [(rec gen)])
-
-(documentation: /.set
- ""
- [(set hash size value_gen)])
-
-(documentation: /.dictionary
- ""
- [(dictionary hash size key_gen value_gen)])
-
-(documentation: /.result
- ""
- [(result prng calc)])
-
-(documentation: /.prng
- ""
- [(prng update return)])
-
-(documentation: /.pcg_32
- (format "An implementation of the PCG32 algorithm."
- \n "For more information, please see: http://www.pcg-random.org/"))
-
-(documentation: /.xoroshiro_128+
- (format "An implementation of the Xoroshiro128+ algorithm."
- \n "For more information, please see: http://xoroshiro.di.unimi.it/"))
-
-(documentation: /.split_mix_64
- "An implementation of the SplitMix64 algorithm.")
-
(.def .public documentation
(.List $.Module)
($.module /._
"Pseudo-random number generation (PRNG) algorithms."
- [..PRNG
- ..Random
- ..only
- ..one
- ..refined
- ..safe_frac
- ..text
- ..and
- ..or
- ..either
- ..rec
- ..set
- ..dictionary
- ..result
- ..prng
- ..pcg_32
- ..xoroshiro_128+
- ..split_mix_64
- ($.default /.functor)
+ [($.default /.functor)
($.default /.apply)
($.default /.monad)
@@ -135,5 +49,73 @@
($.default /.time)
($.default /.duration)
($.default /.month)
- ($.default /.day)]
+ ($.default /.day)
+
+ ($.documentation /.PRNG
+ "An abstract way to represent any PRNG.")
+
+ ($.documentation (/.Random it)
+ "A producer of random values based on a PRNG.")
+
+ ($.documentation /.only
+ "Retries the generator until the output satisfies a predicate."
+ [(only pred gen)])
+
+ ($.documentation /.one
+ ""
+ [(one check random)])
+
+ ($.documentation /.refined
+ "Retries the generator until the output can be refined."
+ [(refined refiner gen)])
+
+ ($.documentation /.safe_frac
+ "A number in the interval [0.0,1.0].")
+
+ ($.documentation /.text
+ ""
+ [(text char_gen size)])
+
+ ($.documentation /.and
+ "Sequencing combinator."
+ [(and left right)])
+
+ ($.documentation /.or
+ "Heterogeneous alternative combinator."
+ [(or left right)])
+
+ ($.documentation /.either
+ "Homogeneous alternative combinator."
+ [(either left right)])
+
+ ($.documentation /.rec
+ "A combinator for producing recursive random generators."
+ [(rec gen)])
+
+ ($.documentation /.set
+ ""
+ [(set hash size value_gen)])
+
+ ($.documentation /.dictionary
+ ""
+ [(dictionary hash size key_gen value_gen)])
+
+ ($.documentation /.result
+ ""
+ [(result prng calc)])
+
+ ($.documentation /.prng
+ ""
+ [(prng update return)])
+
+ ($.documentation /.pcg_32
+ (format "An implementation of the PCG32 algorithm."
+ \n "For more information, please see: http://www.pcg-random.org/"))
+
+ ($.documentation /.xoroshiro_128+
+ (format "An implementation of the Xoroshiro128+ algorithm."
+ \n "For more information, please see: http://xoroshiro.di.unimi.it/"))
+
+ ($.documentation /.split_mix_64
+ "An implementation of the SplitMix64 algorithm.")]
[]))