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

Operators #28

Open
fakenickels opened this issue Jan 30, 2018 · 0 comments
Open

Operators #28

fakenickels opened this issue Jan 30, 2018 · 0 comments

Comments

@fakenickels
Copy link
Member

Would be cool if it provided some well-known operators like and some others to work with Js.t

(>>=) = bind (for options)

// the dot would be to recall the {. } syntax shotcut for JS objects in Reason

(||.) = defaults Js.Null_undefined
// nullableStringFn() ||. "default!"

(>>=.) = Bind Js.Null_undefined
// nullableObjectReturn >>=. (x => x##foo) >>=. (foo => foo##bar) ||. "default!"

etc

@fakenickels fakenickels changed the title Infixes? Belt.Infixes? Jan 30, 2018
@fakenickels fakenickels changed the title Belt.Infixes? Operators Jan 30, 2018
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

1 participant