Thank you, it simplified my code a bit. Can somebody remove this topic now?
W dniu piątek, 17 sierpnia 2018 12:21:29 UTC+2 użytkownik Fernando Tapia Rico napisał: > > You can simply pass the function in that use case. > > f = fn x -> x*2 end > Enum.map([1,1,1], f) > > > On Friday, August 17, 2018 at 12:19:31 PM UTC+2, Jakub G wrote: >> >> It is possible to add support for using local defined functions in >> ampersand notation? >> >> Example: >> f = fn x -> x*2 end >> Enum.map([1,1,1], &f/1) >> >> It would really simplify those >> &f.(&1) >> calls, especially with functions passed as function arguments. >> >> >> -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/a63b23be-91b4-4555-b62f-12ed1702c610%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
