Is it possible to programmatically pattern match?
Pattern = {error, '_'},
IsError =
case {error, "foo"} of
Pattern -> true;
_ -> false
end.
I know I can do this with macros, but I have a dynamic list of patterns I would like to match that aren't known ahead of time.
mensia:match_objectall the way down toets:match_objectand that looks like a NIF so something I couldn't use outside of mnesia/ets/dets. github.com/erlang/otp/blob/master/lib/stdlib/src/ets.erl#L262