Skip to content

clojure.core/dotimes

View this page on ClojureDocs

Type: macro Added: Clojure 1.0 Examples: 3 Runnable: 1
([bindings & body])

bindings => name n

Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.

Examples

by Brian Marick on . May have evaluation errors.
by GyrosOfWar on
by akhuramazda on . May have evaluation errors.

Note by mars0i

dotimes always returns nil no matter what is returned by the body the last time through the loop.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.