Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jakear
on Aug 14, 2023
|
parent
|
context
|
favorite
| on:
Elixir – Why the dot when calling anonymous functi...
Okay, so make the lambda's binding refer to several of those 'structs' and have .( dispatch to the correct one based on the airity at the call site.
throwawaymaths
on Aug 14, 2023
[–]
That will introduce unnecessary overhead in the basic case. At some level you do want to access the "low level" function (interfacing with Erlang, e.g.) if you really want that sort of dispatch you can write your own polyfunction data type.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: