I am mapping a function across a list, but would like to pause before each item. For instance:

variable * 2

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?

  • 5
    $\begingroup$ There is a function called Pause that should do what you want. Just insert Pause[2]; in the definition of you function. $\endgroup$
    – TimRias
    Commented Nov 19, 2017 at 20:02
  • $\begingroup$ Inserting 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$
    – halirutan
    Commented Nov 19, 2017 at 22:36
  • $\begingroup$ you can use Print or maybe work with Monitor. Its not really clear exactly what you are trying to accomplish, $\endgroup$
    – george2079
    Commented Nov 20, 2017 at 0:19
  • $\begingroup$ I am curious about the motivation of the stated requirement, which somewhat appears strange to me. $\endgroup$ Commented Dec 20, 2017 at 11:09
  • 2
    $\begingroup$ This question first came up when I was using an API. The website suggested I do not abuse the API and limit my entries to once per 10 seconds $\endgroup$ Commented Dec 22, 2017 at 5:23

1 Answer 1


How about something like

  With[{output = function[input]}, 
   Print[{input, output}];
] /@ {1,2,3}

Not the answer you're looking for? Browse other questions tagged or ask your own question.