Skip to content

Commit

Permalink
Add stack for julia < v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Mar 13, 2024
1 parent a0065a0 commit a39adbd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utility/util.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# compatibility with earlier versions of Julia
@static if VERSION < v"1.9"
stack(f, itr) = mapreduce(f, hcat, itr)
end

# Get next and previous directional CTM enviroment index, respecting periodicity
_next(i, total) = mod1(i + 1, total)
_prev(i, total) = mod1(i - 1, total)
Expand Down

0 comments on commit a39adbd

Please sign in to comment.