From 59f6fb672c5d13d0006284411c4bd0d17632dd79 Mon Sep 17 00:00:00 2001 From: RayPals Date: Mon, 1 Jun 2026 00:55:39 +0200 Subject: [PATCH] Add lib/random.claro from Claro v1.17.26 zip --- lib/random.claro | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/random.claro diff --git a/lib/random.claro b/lib/random.claro new file mode 100644 index 0000000..cce0d08 --- /dev/null +++ b/lib/random.claro @@ -0,0 +1,18 @@ +# Claro Standard Library: random +# Use: IMPORT "lib/random.claro" AS random +EXPORT ALL + +TEACH seed TAKES n + SEED n + RETURN YES +LEARNED + +TEACH float TAKES none + RAND AS r + RETURN r +LEARNED + +TEACH int TAKES lo, hi + RAND FROM lo TO hi AS r + RETURN r +LEARNED