Skip to content

Commit 9921e1f

Browse files
authored
Merge pull request #85 from NHDaly/init_animals
Move initializing `animals` out of __init__ to global scope.
2 parents 246d049 + 2b4034b commit 9921e1f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/MacroTools.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ include("examples/forward.jl")
1919
const animals = Symbol[]
2020
const animals_file = joinpath(@__DIR__, "..", "animals.txt")
2121

22-
function __init__()
23-
_animals = split(read(animals_file, String))
24-
resize!(animals, length(_animals))
25-
animals .= Symbol.(lowercase.(_animals))
26-
Compat.Random.shuffle!(animals)
27-
end
22+
# Load and initialize animals symbols.
23+
_animals = split(read(animals_file, String))
24+
resize!(animals, length(_animals))
25+
animals .= Symbol.(lowercase.(_animals))
26+
Compat.Random.shuffle!(animals)
2827

2928
end # module

0 commit comments

Comments
 (0)