Your code does not follow the pattern matching syntax; I don't see "is" anywhere. That's what is actually doing the casting
Edit: I think I'm completely wrong about "is" being required
Your code does not follow the pattern matching syntax; I don't see "is" anywhere. That's what is actually doing the casting
Edit: I think I'm completely wrong about "is" being required