Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a built in way of converting Option to a scalaz validation?

Tags:

scala

scalaz

I've been looking but I can't find an implicit converter. Obviously it would be trivial to write one but I'm wondering if I've missed one in the scalaz library somehow!

like image 714
Noel Kennedy Avatar asked Jan 19 '12 17:01

Noel Kennedy


1 Answers

Scalaz has a implicit conversion of Option to OptionW, which declares the toFailure and toSuccess methods.

like image 185
Jean-Philippe Pellet Avatar answered Oct 21 '22 19:10

Jean-Philippe Pellet