Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you can define functions outside of a module using fn blocks


There's good odds it will come to elixir, since support just landed in Erlang


To 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).


There's also defining a module and then `import`ing it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: