I am mapping a function across a list, but would like to pause before each item. For instance:
function[variable_]:=(
variable * 2
)
function/@{1,2,3}
would give me {2, 3, 6}
However, I would like for the function to pause before being mapped to the next variable, for instance, 1*2 (pause for let's say, 2 seconds), 2 *2 (pause for 2 seconds) 3 * 2 (pause for two seconds).
Is this at all possible?
Pause
that should do what you want. Just insertPause[2];
in the definition of you function. $\endgroup$Pause
is probably not what you want. It will just increase the running time but you won't see how each element is calculated. $\endgroup$Print
or maybe work withMonitor
. Its not really clear exactly what you are trying to accomplish, $\endgroup$