RosettaCodeData/Task/Repeat/Common-Lisp/repeat.lisp

5 lines
98 B
Common Lisp

(defun repeat (f n)
(dotimes (i n) (funcall f)))
(repeat (lambda () (format T "Example~%")) 5)