Sorry my comment was wrong. It’s been a while when I messed with gleam and I remember it was missing a critical thing but I misremembered what it was.
Gleam doesn’t support interfaces. Not generics. You are completely right.