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

adds func keyword for nim #2468

Merged
merged 2 commits into from Mar 25, 2020
Merged

Conversation

adnanyaqoobvirk
Copy link
Contributor

The func keyword introduces a shortcut for a noSideEffect proc.

func binarySearch[T](a: openArray[T]; elem: T): int

Is short for:

proc binarySearch[T](a: openArray[T]; elem: T): int {.noSideEffect.}

Nim Manual Reference

@joshgoebel
Copy link
Member

This looks good. Please add a changelog entry.

@joshgoebel joshgoebel added enhancement An enhancement or new feature language labels Mar 24, 2020
@joshgoebel joshgoebel added this to the 10.0 Spring Relase milestone Mar 24, 2020
@adnanyaqoobvirk
Copy link
Contributor Author

This looks good. Please add a changelog entry.

Done.

@joshgoebel joshgoebel merged commit 0b40e1c into highlightjs:master Mar 25, 2020
@joshgoebel
Copy link
Member

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants