Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "random" #43

Closed
skx opened this issue Oct 16, 2022 · 0 comments · Fixed by #44
Closed

Implement "random" #43

skx opened this issue Oct 16, 2022 · 0 comments · Fixed by #44
Assignees

Comments

@skx
Copy link
Owner

skx commented Oct 16, 2022

Which will return a random value between zero and the N specified:

(random 10) will return one of 0, 1, 2 .. 8, 9.

@skx skx self-assigned this Oct 16, 2022
skx added a commit that referenced this issue Oct 16, 2022
This pull-request adds (random) as a built-in primitive, and then
uses that to create a pair of other functions:

* random:char
  * Return a random letter from a-z
* random:item
  * Return a random list-element.

This closes #43.
@skx skx closed this as completed in #44 Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant