underscoreio/essential-scala

Issue with function (4.2.2.3)

Closed this issue · 1 comments

4.2.2.3 A Short Division Exercise

... Finally, write a sample function that calls divide, matches on the result, and returns a sensible description.

Functions are not described at this moment.

The part of code in solution is not valid:

divide(1,  0)  match  {
   case  Finite(value)  =>  s"It's  finite:  ${value}"
   case  Infinite =>  s"It's  infinite"
}

I've addressed the first part of this one in the commit linked above. I'm not sure what you mean in the second part.

The code in the solution does compile. It could be because the issue was fixed recently, or it could be I'm misunderstanding the problem.