Looking at source code in Base
I notice a lot of one liners that look like this:
for i in 1:n; do_something(i) end
and a rarer
for ignored_index in 1:n; do_this_n_times() end
A simple grep 'for.*end' **/*.jl
gives 150 matches on current master. In 39 cases, there is a ;
before the end
. I wonder if it would make sense to have a one-liner syntax equivalent to for
. Perhaps analogously to a comprehension syntax, eg
Void[do_this_and_dont_collect(i) for i in 1:n]
Similarly, there is no equivalent of COMMON-LISP:MAPC
for more functional style.
I found this older, somewhat related issue:
https://github.com/JuliaLang/julia/issues/1657