# How can I create currying functions using pure function syntax?

For example how can I write

In:
pureFunctionSyntax[myF] /@ {7, 3}
Out:
{myF[7, Log[7]], myF[3, Log[3]]}


Function[h, h[#, Log[#]] &][myF] /@ {7, 3}


and for fun, less general, as pointed in comments:

Through@*#[Identity, Log] &[myF] /@ {7, 3}


which can be even shorter, thanks to ybeltukov

Through@*#[# &, Log] &[myF] /@ {7, 3}

• Wow, you can write even shorter Through@*#[# &, Log] &. Nov 18, 2015 at 17:10
• @ybeltukov ah, of course, thanks :)
– Kuba
Nov 18, 2015 at 17:14
• This wont work if myF has a definition. For example Through@*#[Identity, Log] &[f[#1] + #2 &] /@ {7, 3} outputs {Log[7] + f[Identity][7], Log[3] + f[Identity][3]} not {f[7] + Log[7], f[3] + Log[3]}.
– user
Nov 18, 2015 at 21:19
• @user This is one of reasons why I've said it is less general, but the first one will work anyway.
– Kuba
Nov 18, 2015 at 22:08
• @user I've edited the question to stress out your concerns.
– Kuba
Nov 18, 2015 at 22:41

Yes, you can use only pure functions:

f = ## &[#, Log@#] & /* # &;

f[myF] /@ {7, 3}
(* {myF[7, Log[7]], myF[3, Log[3]]} *)


It can be shorter with a bit different syntax:

g = ## &[#, Log@#] &;
g /* myF /@ {7, 3}
(* {myF[7, Log[7]], myF[3, Log[3]]} *)


I like this syntax:

In:
f[#, Log[#]] & /. f -> # &[myF] /@ {7, 3}
Out:
{myF[7, Log[7]], myF[3, Log[3]]}