I found how to pattern match a function on Improve error messages for invalid expression in match · Issue #5649 · elixir-lang/elixir.
x = &List.first/1 case &List.first/1 do ^x -> true end
I also wrote a summary for it: How to pattern match a function in Elixir - dsdshome
Feel free to check it out and leave some comments.
Read next A deeper dive in Elixir's Plug