error handling best practices

would this work better here?

```scala
val validate: Input => Out = case (five, palindrome) => {
  ...
}
```