The example uses the encoding <@U72C3TBDH> suggest...
# arrow
r
The example uses the encoding @streetsofboston suggest as an ADT:
Copy code
sealed class ValidationError(val msg: String) {
  data class DoesNotContain(val value: String) : ValidationError("Did not contain $value")
  data class MaxLength(val value: Int) : ValidationError("Exceeded length of $value")
  data class NotAnEmail(val reasons: Nel<ValidationError>) : ValidationError("Not a valid email")
}