equal
  deleted
  inserted
  replaced
  
    
    
|    413 // the JVM is not as clever as other functional languages. It can  |    413 // the JVM is not as clever as other functional languages. It can  | 
|    414 // only optimise "self-tail calls". This excludes the cases of  |    414 // only optimise "self-tail calls". This excludes the cases of  | 
|    415 // multiple functions making tail calls to each other. Well, |    415 // multiple functions making tail calls to each other. Well, | 
|    416 // nothing is perfect.  |    416 // nothing is perfect.  | 
|    417  |    417  | 
|    418  |         | 
|    419  |         | 
|    420  |         | 
|    421  |         | 
|    422  |         | 
|    423  |         | 
|    424  |         | 
|    425  |         | 
|    426  |         | 
|    427 //************ |         | 
|    428 // Either |         | 
|    429 val either1 : Either[Exception,Int] = Right(1) |         | 
|    430 val either2: Either[Exception, Int] = Right(2) |         | 
|    431  |         | 
|    432 for{ |         | 
|    433   one <- either1 |         | 
|    434   two <- either2 |         | 
|    435 } yield one + two |         |