@@ -1028,8 +1028,8 @@ ftype when called with args of type `argtypes`.
10281028`Activity` is the Activity of the return value, it may be `Const` or `Duplicated`
10291029(or its variants `DuplicatedNoNeed`, `BatchDuplicated`, and`BatchDuplicatedNoNeed`).
10301030
1031- The forward function will return the primal ( if requested) and the shadow
1032- (or nothing if not a `Duplicated` variant ).
1031+ The forward function will return the shadow (or nothing if not a `Duplicated` variant)
1032+ and the primal ( if requested ).
10331033
10341034Example returning both the return derivative and original return:
10351035
@@ -1040,7 +1040,7 @@ c = 55; d = 9
10401040
10411041f(x) = x*x
10421042forward = autodiff_thunk(ForwardWithPrimal, Const{typeof(f)}, Duplicated, Duplicated{Float64})
1043- res, ∂f_∂x = forward(Const(f), Duplicated(3.14, 1.0))
1043+ ∂f_∂x, res = forward(Const(f), Duplicated(3.14, 1.0))
10441044
10451045# output
10461046
@@ -1056,7 +1056,7 @@ c = 55; d = 9
10561056
10571057f(x) = x*x
10581058forward = autodiff_thunk(Forward, Const{typeof(f)}, Duplicated, Duplicated{Float64})
1059- ∂f_∂x = forward(Const(f), Duplicated(3.14, 1.0))
1059+ ∂f_∂x, = forward(Const(f), Duplicated(3.14, 1.0))
10601060
10611061# output
10621062
0 commit comments