Although I have used Mathematica for a while I still consider myself a noobie. I still don't understand the fundamental concepts of many of the functions. My question in this case is why I need the Evaluate function to make the following example code work?
eqn = y'[t] == 2;
yList = {.2, .4, .5};
eventList = Map[y[t] == # &, yList];
{fun, dat} =
Reap@NDSolve[{eqn, y[0] == 0,
WhenEvent[Evaluate[eventList], {tdat = t; Sow[tdat]}]},
y[t], {t, 0, 5}]
Without the Evaluate operating on eventList the NDSolve returns an empty list.