Even though Dynamic[ls]
is presented as ls
, its head is Dynamic
:
x = Dynamic[ls]
Head[x]
(*
{1, 2, 3}
Dynamic
*)
or
Basically, Dynamic
is a wrapper, and is there even if you cannot see it. Its like you were writing
MapThread[f, {symb, {10, 20, 30}}]
with symb
undefined, or
MapThread[f, {Integrate[symb[var], var], {10, 20, 30}}]
You can fix it by doing
Dynamic[MapThread[f, {ls, {10, 20, 30}}]]
instead.
So:
Wherever you had written Dynamic[ls]
, you still have Dynamic[ls]
. It may be displayed by the frontend as {1,2,3}
, but it is not; it's Dynamic[ls]
. So, MapThread
goes to look at the first part of its second argument and sees Dynamic
instead of a List
, so it stops and emits a message; this message includes Dynamic[ls]
in it. When the message reaches the "surface" to be displayed, Dynamic[ls]
gets automatically interpreted by the frontend as usual: it's displayed as {1,2,3}
, because that's what ls
evaluates to. But it is still Dynamic[ls]
, not {1,2,3}
, which is simply how it is displayed.
Try this: Do[Sin[i], Dynamic@{i, 1, 2}]
and think about what happens...
{f[1, 10], f[2, 20], f[3, 30]}
; I suppose you cut and pasted the wrong thing! $\endgroup$