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

Factor out Maybe.of #234

Closed
wants to merge 1 commit into from
Closed

Factor out Maybe.of #234

wants to merge 1 commit into from

Conversation

christiantakle
Copy link
Contributor

Would I be crazy if I update alle the guides examples to use => syntax? I feel it would make the examples more clear by removing noise.

If you wouldn't mind that change let me know if you prefer a particular style. I would properly make a PR for a chapter and then we could discuss it further.

//  withdraw :: Number -> Account -> Maybe(Account)
var withdraw = curry((amount, {balance}) =>
  Maybe.of(balance >= amount? {balance: balance - amount} : null);

// or
var withdraw = // :: Number -> Account -> Maybe(Account)
  curry((amount, {balance}) =>
    Maybe.of(balance >= amount? {balance: balance - amount} : null);

Would I be crazy if I update alle the guides examples to use `=>` syntax? I feel it would make the examples more clear by removing noise.

If you wouldn't mind that change let me know if you prefer a particular style. I would properly make a PR for a chapter and then we could discuss further.

```js
//  withdraw :: Number -> Account -> Maybe(Account)
var withdraw = curry((amount, {balance}) =>
    Maybe.of(balance >= amount? {balance: balance - amount} : null);

// or
var withdraw = // :: Number -> Account -> Maybe(Account)
  curry((amount, {balance}) =>
    Maybe.of(balance >= amount? {balance: balance - amount} : null);
```
@KtorZ
Copy link
Member

KtorZ commented Jan 6, 2016

Hey !
Your PR seems to be related to the issue #83.
Nevertheless, we've no news about an existing fork with an ES6 version as discussed. If you want to start one, that would be great :)

@christiantakle
Copy link
Contributor Author

@KtorZ Cool, I'm starting here #235. Just need guidance on style then I will finish it this weekend.

@KtorZ KtorZ closed this Feb 20, 2016
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.

2 participants