Can function application be overriden with Macro in Elixir?
Let's say I'd want to override each function call with a macro that counts how many times I called each particular function. Is it possible in Elixir? I know there is a possibility of overriding builtin macros and functions with import Kernel, except: [name: arity] import MyOwnKernel But it doesn't seem to work for apply/2 nor apply/3
You cannot. Those are defined as special forms (Kernel.SpecialForms) and they cannot be overridden.
Not the answer to your direct question, but if you really want to trace function calls and do some analysis, you may consider Erlang tracing capabilities. I provided a simple example in this answer. Also, you might look into fprof for profiling, which can give you function count. IIRC fprof analyzes only the process in which you start it, and you can't run multiple profiles simultaneously.
Julia: create specific index variables in Base.Cartesian
How to define a function based on a previously defined function on a module?
Io's method scope
How to instantiate a class using an explicit first, and a default second argument, via the meta model?
access to member of object in php with value of parameter? [closed]
How to construct a macro emitting arbitrary number of possible matches?
Generate algebraic expression at compile time in D
Is D powerful enough for these features?
Embedding a domain specific language in an OCaml toplevel — to Camlp4 or not?
Is it possible to do code generation in Coffeescript?
In Pharo, my classes should not appear in the Browser, or even in the Smalltalk global
Why does the halting problem make it impossible for software to determine the time complexity of an algorithm
Pharo: #subclass:instanceVariables… message personalized
How can I write metrics into my software that speak to investors while standing up to geek scrutiny? [closed]
CoffeeScript dynamic methods
Tool for automated porting and language that can compile into others