Add lib/random.claro from Claro v1.17.26 zip

This commit is contained in:
RayPals
2026-06-01 00:55:39 +02:00
parent da033fcfb8
commit 59f6fb672c
+18
View File
@@ -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