Something like a Map with patterns as keys

Something which might be interesting for you could be :ets.fun2ms which transforms a function to an ets match specification.

2 Likes