Hello there!
Let’s say I have type like this:
type Component
= Name String
| Speed Float
Would it be possible to write a function allowing to find, in a List Component, a specific variant, like Name “Yoda”? I imagined a function type like this one, but I have no Idea if the implementation is possible…
getComponent a -> List Component -> Maybe a
Thanks