I know this isn’t directly arrow related, but ther...
# arrow
k
I know this isn’t directly arrow related, but there might be more functional approach to what I want to achieve. Say I have a
Map<A, B>
, is there a way to construct a map where type B is dependant on A. However, for different variations of A (say, enum values), B needs to represent a different type. Is this even possible?
s
could you provide some code example of input and expected output?
a
there are languages with that ability, they are called dependently-typed languages (Idris 2 is a good one), but unfortunately Kotlin has no such feature