Map and reduce/fold over HList of scalaz.Validation
I started out with something like this: def nonEmpty[A] = (msg: String) => (a: Option[A]) => a.toSuccess(msg) val postal: Option[String] = request.param("postal") val country: Option[String] = request.param("country") val params = (postal |> nonEmpty[String]("no postal" )).toValidationNel |@| (country |> nonEmpty[String]("no country")).toValidationNel params { (postal, country) => ... } Now I thought it would be nice to reduce the boilerplate for better readability and for not having to explain to more junior team members what .toValidateNel and |@| mean. The first thought was List but then