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

List functions #141

Merged
merged 11 commits into from
Jun 1, 2020
Merged

List functions #141

merged 11 commits into from
Jun 1, 2020

Conversation

JacobGinsparg
Copy link
Contributor

Adding functions to stdlib.List for #94

@ospencer ospencer self-assigned this May 31, 2020
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Looking really good! Left some comments/suggestions. Let me know your thoughts.

compiler/test/stdlib/lists.test.gr Outdated Show resolved Hide resolved
compiler/test/stdlib/lists.test.gr Show resolved Hide resolved
compiler/test/stdlib/lists.test.gr Show resolved Hide resolved
compiler/test/stdlib/lists.test.gr Show resolved Hide resolved
stdlib/lists.gr Outdated Show resolved Hide resolved
stdlib/lists.gr Outdated Show resolved Hide resolved
stdlib/lists.gr Outdated Show resolved Hide resolved
stdlib/lists.gr Show resolved Hide resolved
stdlib/lists.gr Outdated Show resolved Hide resolved

let rotate = (n, l) => {
let (beginning, end) = if (n >= 0) part(n, l) else part(length(l) + n, l)
append(end, beginning)
Copy link
Member

Choose a reason for hiding this comment

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

😍

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Great work!

@ospencer ospencer merged commit d43d962 into grain-lang:master Jun 1, 2020
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.

None yet

2 participants