Skip to main content
added 149 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is similar to

#1[#2] & @@@ Thread[{f1, f2, f3} -> {x1, x2, x3}]

and

Thread[{f1, f2, f3} -> {x1, x2, x3}] /. Rule -> (#1[#2] &)

Or

{f1, f2, f3}~Function[, #1[#2], Listable]~{x1, x2, x3}

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

{f1, f2, f3}~Function[, #1[#2], Listable]~{x1, x2, x3}

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is similar to

#1[#2] & @@@ Thread[{f1, f2, f3} -> {x1, x2, x3}]

and

Thread[{f1, f2, f3} -> {x1, x2, x3}] /. Rule -> (#1[#2] &)

Or

{f1, f2, f3}~Function[, #1[#2], Listable]~{x1, x2, x3}

$\ ${f1[x1], f2[x2], f3[x3]}

added 114 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

{f1, f2, f3}~Function[, #1[#2], Listable]~{x1, x2, x3}

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

{f1, f2, f3}~Function[, #1[#2], Listable]~{x1, x2, x3}

$\ ${f1[x1], f2[x2], f3[x3]}

added 116 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Needs["GeneralUtilities`"]
MultiMapAt[Range[3], {f1, f2, f3}][{x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}

Which is equivalent to using

(Composition @@ MapThread[MapAt, {{f1, f2, f3}, Range[3]}])[{x1, x2, x3}]

Or

MapIndexed[{f1, f2, f3}[[First@#2]]@#1 &, {x1, x2, x3}]

$\ ${f1[x1], f2[x2], f3[x3]}


Or

#1[#2] & @@@ Thread[{{f1, f2, f3}, {x1, x2, x3}}]

$\ ${f1[x1], f2[x2], f3[x3]}

added 83 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Loading
added 113 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Loading
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Loading