scalapuzzlers / scalapuzzlers.github.com

Github Pages behind scalapuzzlers.com
www.scalapuzzlers.com
161 stars 53 forks source link

Puzzler candidate: 'Double Ternary Operator' #104

Closed mkubala closed 10 years ago

mkubala commented 10 years ago

English is not my native language and each day I'm trying to improve my skills. I still make mistakes, so any suggestions about my grammar or vocabulary will be welcome.

demobox commented 10 years ago

Thanks for the submission, @mkubala! It may take a little longer for us to get round to having a look at this at the moment, so please be patient...

As an initial comment, if I'm understanding this correctly: the underlying mechanism here seems to be the same as in "All's Well That Folds Well"? I.e. that operators ending in a colon are right-associative?

Or is there some other important aspect I'm missing here..?

mkubala commented 10 years ago

To be honest, probably I overlooked this puzzle about fold.

Main aspect of my puzzle is keep in mind the colon rule, especially when developing internal DSLs. But now it seems to be a duplicate of pzzlr-034..

demobox commented 10 years ago

Main aspect of my puzzle is keep in mind the colon rule

Indeed! I think we probably all read about this at some point, but it's easy to forget, and can result in some pretty weird behaviour. Thanks for taking the time to submit this, @mkubala - looking forward to your next one! ;-)