As indicated in the title I'm looking for the fastest way to transform a[b[c]] into a[b][c], and the natural generalization to an arbitrary chaining of arguments. I'm sure there's got to be a convenient way that I've overlooked.
In my cases a, b, and c can be any expression with any complicated internal structure they like.
As an example, we could have some terrible deeply nested thing like:
bleh =
Nest[f, 10, 10]@
Nest[b, 100, 100]@Nest[c, RandomReal[{}, {1000, 1000}], 1000];
And then we can to convert this into:
blehm =
Nest[f, 10, 10][
Nest[b, 100, 100]][Nest[c, RandomReal[{}, {1000, 1000}], 1000]]
Operate. – QuantumDot Jan 23 '19 at 06:20f = Curry[Replace][a_[b_[c_]] :> a[b][c]]also works, so thata[b[c]] // fgives the desired result. – Shredderroy Jan 23 '19 at 06:29a[b[c[d[...]]]]toa[b][c][d]...? – David G. Stork Jan 23 '19 at 06:40a@b[c]@dasa[b[c]][d]? It's just that I have been looking for a left-associative counterpart of@for some time and this question is just what I need! – Anton.Sakovich Jan 23 '19 at 08:19a b cto be any expression you better show some examples, what isa[b[c], d[e, f]]supposed to be converted to? – Kuba Jan 23 '19 at 09:14