Non-exceptions versions of your favorite Java methods!
Parse a String into Some[(Double, Double, Double, Double)]; return None on error.
Parse a String into Some[Array[Double]]; return None on error.
Parse a String into Some[(Double, Double)]; return None on error.
Parse a String into Some[Array[(Double, Double)]]; return None on error.
Like parsePoints but ensures that we have at least 3 points.
Turns out this thing is called traverse()
Turns out this thing is called traverse()
The basic idea is to do bs = as.map(f). If bs contains no None values then we return Some(bs). Otherwise we return None, and propagate the "error" up the call.
It's in scalaz apparently; eventually we might want to consider using that.
Turn exceptions into Option[A].
Turn exceptions into Option[A]. It's magic!