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

add List/sum and List/range built-ins #696

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Sipher
Copy link
Member

@Sipher Sipher commented Aug 22, 2024

Added an inclusive List/range built-in to bend

Tested multiple examples, all of them seem to be working

@Sipher Sipher linked an issue Aug 22, 2024 that may be closed by this pull request
@Sipher Sipher requested a review from developedby August 22, 2024 21:20
src/fun/builtins.bend Outdated Show resolved Hide resolved
src/fun/builtins.bend Outdated Show resolved Hide resolved
@guarilha
Copy link

Tested multiple examples, all of them seem to be working

Can you include the tests on this PR too, please?

Sipher and others added 2 commits August 23, 2024 10:53
Co-authored-by: Nicolas Abril <[email protected]>
Co-authored-by: Nicolas Abril <[email protected]>
@Sipher
Copy link
Member Author

Sipher commented Aug 26, 2024

Tested multiple examples, all of them seem to be working

Can you include the tests on this PR too, please?

I wrote simple tests for the functions, did not find any asserts/test suit in the repo

Copy link
Member

@developedby developedby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we should test the prelude/standard library like other regular Bend programs, but for now we can create a new test suite that just runs some simple test programs for the builtins.

In tests/golden_tests.rs you can create a new test function called builtins that is identical to the io function.

Then, in tests/golden_tests/ you can create a new directory called builtins and put your test programs inside.

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.

Implement List/sum and List/range functions in Bend built-ins
3 participants