Skip to content

Commit

Permalink
Add comments for design of ReactionMethod
Browse files Browse the repository at this point in the history
see https://discourse.julialang.org/t/is-there-a-way-to-get-f-from-typeof-f/18818/12
this is why we store `methodfn::M`

ReactionMethod{M, R, P, Nargs} <: AbstractReactionMethod
    methodfn::M
  • Loading branch information
sjdaines committed May 4, 2023
1 parent 9a2df45 commit 6ecff07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReactionMethod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This is called after model arrays are allocated, and prior to setup.
"""
struct ReactionMethod{M, R, P, Nargs} <: AbstractReactionMethod
"callback from Model framework"
methodfn::M
methodfn::M # NB: store function object, even though we have M (see https://discourse.julialang.org/t/is-there-a-way-to-get-f-from-typeof-f/18818/12)

"the Reaction that created this ReactionMethod"
reaction::R
Expand Down

0 comments on commit 6ecff07

Please sign in to comment.