We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4061611 commit 6fc69c8Copy full SHA for 6fc69c8
_weave/lecture03/sciml.jmd
@@ -174,16 +174,16 @@ initial `W` and `b` matrices (according to the `glorot_uniform` distribution for
174
175
The last portion might be new. This is known as a **callable struct**, or a
176
functor. It defines the dispatch for how calls work on the struct. As a quick
177
-demonstration, let's define a type `A` with a field `x`, and then make instances
+demonstration, let's define a type `MyCallableStruct` with a field `x`, and then make instances
178
of `A` be the function `x+y`:
179
180
```julia
181
-struct A
+struct MyCallableStruct
182
x
183
end
184
185
-(a::A)(y) = a.x+y
186
-a = A(2)
+(a::MyCallableStruct)(y) = a.x+y
+a = MyCallableStruct(2)
187
a(3)
188
```
189
0 commit comments