Basic typeclass design and implementation
using the regular scala syntax, here's how you can mimick the "if-then-else" expression