Closed adampingel closed 6 years ago
https://github.com/randomforestwhitaker/questions/blob/df5ab371251d6690faa24f280f5fd266d0a702c5/answer_1.scala#L15-L20
If you ever find yourself returning true or false, you're probably not phrasing the function as parsimoniously as you can. Simplify this expression.
true
false
simplified to x >= 0. was too eager to apply pattern matching to everything lol
https://github.com/randomforestwhitaker/questions/blob/df5ab371251d6690faa24f280f5fd266d0a702c5/answer_1.scala#L15-L20
If you ever find yourself returning
true
orfalse
, you're probably not phrasing the function as parsimoniously as you can. Simplify this expression.