It's still an open issue: https://github.com/JuliaLang/julia/issues/1864, though there have been talks on how to improve.
-Jacob On Wed, Jun 4, 2014 at 8:10 AM, Mauro <mauro...@runbox.com> wrote: > > Is that a fact? That would be sad, since it would mean that a functional > > style suffers a performance penalty in Julia. > > That's the last I heard, but things change fast around here. > > > On Wed, Jun 04 2014, Mauro <mauro...@runbox.com> wrote: > > > >> The anonymous function approach is shorter if you need to pass it to a > >> function, e.g.: > >> map(x -> f2(3,4,x), 1:5) > >> > >> But I think they have not the same performance as proper functions. > >> > >> On Wed, 2014-06-04 at 11:39, tomas.lyc...@gmail.com wrote: > >>> I don't think you can avoid f1 completely, but there is a one-line > syntax > >>> to obtain the same thing: > >>> > >>> f1(a,b) = f2(3,a,b) > >>> > >>> I can't imagine a syntax to express that thing that is more compact yet > >>> equally expressive. > >>> > >>> // T > >>> > >>> On Wednesday, June 4, 2014 12:37:47 PM UTC+2, joanenric barcelo wrote: > >>>> > >>>> First of all, sorry if the question in the title is not well > explained. > >>>> Basically, what I want to know if some of you guys know a nicer way > to do > >>>> the following: > >>>> > >>>> function f2(a, b, c) > >>>> return a+b+c > >>>> end > >>>> > >>>> f = function f1(a,b) > >>>> f2(3,a,b) > >>>> end > >>>> so > >>>> f(1,1) > >>>> is 5 > >>>> > >>>> What I want to do is to create a new function "f" which is similar to > "f2" > >>>> but with only two arguments. The first argument is implicit. > >>>> Anyone knows how f1 can be avoided? Thanks!! > >>>> > >>>> Joan > >>>> > >