Skip to content

Instantly share code, notes, and snippets.

View ericagol's full-sized avatar

Eric Agol ericagol

View GitHub Profile
@ericagol
ericagol / startup.jl
Created July 13, 2018 14:03 — forked from MikeInnes/startup.jl
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end