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

feat: add array range and reverse functions #7159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DeVikingMark
Copy link

Description:

This PR adds two utility functions to the array module:

  • range(size: Field) - creates an array of numbers from 0 to size-1
  • reverse() - returns a new array with elements in reverse order

Resolves TODO comments from test_programs/noir_test_success/brillig_oracle/src/main.nr

Both functions are fully tested and documented with examples.

Copy link
Contributor

Thank you for your contribution to the Noir language.

Please do not force push to this branch after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.

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 this pull request may close these issues.

1 participant