You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great package! I have one slight problem. It is currently impossible to @memoize functions that do not have conventional names but are instead defined on some types. For example:
julia>using Memoize
julia>struct Some
x::Numberend
julia>@memoizefunction (s::Some)(y,z)
s.x * y * z
end
julia> some =Some(10)
>Some(10)
julia>some(60,90)
ERROR: UndefVarError: s not defined
Stacktrace:
[1] var"##s::Some_unmemoized"(y::Int64, z::Int64)
@ Main ./REPL[3]:2
[2] #1
@ ~/.julia/packages/Memoize/12ANR/src/Memoize.jl:62 [inlined]
[3] get!
@ ./iddict.jl:178 [inlined]
[4] (::Some)(y::Int64, z::Int64)
@ Main ~/.julia/packages/Memoize/12ANR/src/Memoize.jl:61
[5] top-level scope
@ REPL[5]:1
Can you think of a way to solve this?
The text was updated successfully, but these errors were encountered:
Great package! I have one slight problem. It is currently impossible to
@memoize
functions that do not have conventional names but are instead defined on some types. For example:Can you think of a way to solve this?
The text was updated successfully, but these errors were encountered: