New answers tagged

3

I think I found a way to do it nicely: f = x \[Function] y \[Function] z \[Function] x + 2 y + 3 z It looks nicer in the front end:


0

How about this? SetAttributes[CurriedFunction, HoldAll]; CurriedFunction[vars_, body_] := If[VectorQ[vars] && Length[vars] > 0, Block[vars, Fold[Function[#2, #1] &, Function[Evaluate[vars[[-1]]], body], Rest[Reverse[vars]]] ], Function[vars, body] ]; x = 7; y = 8; z = 9; f = CurriedFunction[{x, y, z}, 1 + 1 + x + 2 ...


1

Try MapThread[Function[x, counties[x, #2]] /@ #&, {uf[[;;3]], {mesoMG1, mesoMG2, mesoSP}}]


Top 50 recent answers are included