I am considering the design of a filtering function that will prevent some function calls and allow others.  For example, such a function might look like this:<br><br>filter(M,F,Args) -> apply(M,F,Args).<br><br>Of course the above does no actual filtering, but for the use I'm envisioning there will be dozens or even hundreds of clauses for the filter function.  So, I am wondering what the algorithmic complexity of runtime clause selection is.  O(n)?  O(log n)? O(1)?
<br><br>I've also considered an ets table lookup for this, but it does the opposite of what I want.  With ets you can specify a pattern to match against a set of values, but I need a value to match against a list of patterns.
<br><br>Any other ideas?<br><br>Thanks,<br>Dan.<br>