4 ms·
you can define functions outside of a module using fn blocks
by jolux 3y ago
you can define functions outside of a module using fn blocks
- skndr 3y agoThere's also defining a module and then `import`ing it.
- throwawaymaths 3y agoThere's good odds it will come to elixir, since support just landed in Erlang
- erszcz 3y agoTo be specific, it has landed in the Erlang shell with Erlang/OTP 26. Defining inline functions in source code, on the other hand, has been possible for years (like 20+ years).