Utility functions for processing patterns in the Clojerl emitter.
The code in this modules that does the actual work was copied from
v3_core module in the Erlang/OTP
Given a list of patterns, it generates the guards that apply to all of them when considered together and it also transforms the patterns.The exported functions present an API to facilitate the usage from
-spec fold_guards([cerl:cerl()]) -> cerl:cerl().
-spec fold_guards(cerl:cerl(), [cerl:cerl()]) -> cerl:cerl().
Guard with a list of
PatternGuards using the