Skip to content

Commit

Permalink
make h function require broadcasting
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanrboyer committed Oct 5, 2023
1 parent 6e7ed84 commit d2d3de8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/man/manipulation_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ julia> transform(df, :a => g)
22 5 3
33 4 4

julia> h(x, y) = 2x .+ y
julia> h(x, y) = x .+ y .+ 1
h (generic function with 1 method)

julia> transform(df, [:a, :b] => h)
Expand All @@ -345,8 +345,8 @@ julia> transform(df, [:a, :b] => h)
│ Int64 Int64 Int64
─────┼─────────────────────
11 4 6
22 5 9
33 4 10
22 5 8
33 4 8
```

[Anonymous functions](https://docs.julialang.org/en/v1/manual/functions/#man-anonymous-functions)
Expand Down

0 comments on commit d2d3de8

Please sign in to comment.