Skip to content

Commit

Permalink
Fix #64
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Jun 28, 2022
1 parent 4061611 commit 6fc69c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _weave/lecture03/sciml.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ initial `W` and `b` matrices (according to the `glorot_uniform` distribution for

The last portion might be new. This is known as a **callable struct**, or a
functor. It defines the dispatch for how calls work on the struct. As a quick
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
of `A` be the function `x+y`:

```julia
struct A
struct MyCallableStruct
x
end

(a::A)(y) = a.x+y
a = A(2)
(a::MyCallableStruct)(y) = a.x+y
a = MyCallableStruct(2)
a(3)
```

Expand Down

0 comments on commit 6fc69c8

Please sign in to comment.