Win a copy of “Phoenix for Rails Developers” book Automated deployment setup using Distillery and Edeliver without Docker

Pattern matching on dynamic struct types

mod = MyMod
%^mod{} = %MyMod{foo: 42, bar: 3.14}
#⇒ %MyMod{bar: 3.14, foo: 42}

http://rocket-science.ru/hacking/2018/02/23/pattern-matching-on-dynamic-struct-types