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

Updating <*> #43

Closed
mpurland opened this issue Nov 13, 2015 · 2 comments
Closed

Updating <*> #43

mpurland opened this issue Nov 13, 2015 · 2 comments

Comments

@mpurland
Copy link
Member

Original:

public func <*> <A, B>(f : (A -> B)?, a : A?) -> B? {
    return f.flatMap({ a.map($0) })
 }

What do you think about updating it so that it uses <^>?

New:

public func <*> <A, B>(f : (A -> B)?, a : A?) -> B? {
    return f.flatMap { $0 <^> a }
 }
@CodaFi
Copy link
Member

CodaFi commented Nov 13, 2015

That is much cleaner. Submit this as a pull request, please.

@mpurland
Copy link
Member Author

@CodaFi Done 👍 , See #44

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

No branches or pull requests

2 participants