randomforestwhitaker / questions

questions
0 stars 0 forks source link

don't return Nil as a Double #3

Closed adampingel closed 6 years ago

adampingel commented 6 years ago

https://github.com/randomforestwhitaker/questions/blob/df5ab371251d6690faa24f280f5fd266d0a702c5/answer_1.scala#L6

for an empty list, the function should return Double.NaN

randomforestwhitaker commented 6 years ago

changed Nil to Double.NaN in first resolver function (currently commented out). will keep in mind for Nil case in second resolver function implementation