rauschma / exploring-reasonml

http://reasonmlhub.com/exploring-reasonml/
26 stars 0 forks source link

Chapter: Pattern matching: destructuring, `switch`, `if` expressions #8

Open rauschma opened 6 years ago

lewisf commented 6 years ago

going through this and it's excellent content, thanks! fyi, there's a typo: "If you don’t fix this issue, ResonML throws a runtime exception when an operand doesn’t have a matching branch"

rauschma commented 6 years ago

Thanks, will be fixed in the next release!

entorenee commented 6 years ago

Thank you so much for putting this content out there. It has been really helpful. I found a slight typo in the Alternatives in Patterns subsection. ‘If a variable name exists in one subpattern, it must exit in all subpatterns.’ It should say ‘...exist in all subpatterns’.

phamhoaivu911 commented 4 years ago

Thanks for the great content. I think there is a redundant operator word in this sentence:

I don’t find the ternary operator operator very useful in ReasonML: its purpose in languages with C syntax is to have an expression version of the if statement

Hope this helps!