kmeredith (21) [Avatar] Offline
The Listing 5.5 code sample includes:

import AccountRepository._
val account = checkingAccount("a-123", "John K.", today.some,
            None, Balance(0)).toOption.get #A
val dsl = for {
  b <- updateBalance(account, 10000) #B
  c <- store(b)
  d <- balance(
} yield d

Would it be worthwhile to include that `Option#get` is a method that should never be used (since it's Partial), but OK to use in a test?
Debasish Ghosh (111) [Avatar] Offline
I agree that Option#get should not be used. But here it's only in a sample test and I am sure that the data set up ensures that the get actually gets a result. But I would not use it in any serious code.