Closed marius311 closed 2 years ago
The example there seems to work now, not sure exactly what did it.
using Memoization
@macroexpand mutable struct Repository
nrows::Integer # Max number of rows that can be drawn.
ncols::Integer # Max number of cols that can be drawn.
rep # Repository of random numbers in [0,1)
@memoize Repository() = new(0,0,[0])
end
Ref https://discourse.julialang.org/t/implementing-singleton-design-pattern/61704/5