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

Adding @noescape to map operator for Array #58

Closed

Conversation

Pearapps
Copy link
Contributor

On CollectionType, map's transform function is @NoEscape, this function can be too.

@@ -8,7 +8,7 @@

- returns: A value of type `[U]`
*/
public func <^> <T, U>(f: T -> U, a: [T]) -> [U] {
public func <^> <T, U>(@noescape f: T -> U, a: [T]) -> [U] {

Choose a reason for hiding this comment

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

Variable Name Min Length Rule Violation: Variable name should be 2 characters or more: currently 1 characters (variable_name_min_length)

@halogenandtoast
Copy link

I'm a fan of this 👍, I also don't suspect we'll change this implementation to do something that wouldn't make use of @NoEscape.

@Pearapps Pearapps changed the title Adding @noescape to map operator on Array Adding @noescape to map operator for Array Dec 15, 2015
@gfontenot
Copy link
Collaborator

This is dope. We should do an audit of the rest of the framework to make sure there's nowhere else that we can add annotations (@rethrows comes to mind as a possible improvement)

Rebased and merged as 1bc4a29

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

4 participants