Skip to content

Commit c9407bd

Browse files
Update style-guide.md (#49216)
* Update style-guide.md I think the term "trivial anonymous function" is more memorable than `x -> f(x)`. Co-authored-by: woclass <[email protected]> --------- Co-authored-by: woclass <[email protected]>
1 parent 1fff026 commit c9407bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/src/manual/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ You generally want to use [`isa`](@ref) and [`<:`](@ref) for testing types,
378378
not `==`. Checking types for exact equality typically only makes sense when comparing to a known
379379
concrete type (e.g. `T == Float64`), or if you *really, really* know what you're doing.
380380

381-
## Do not write `x->f(x)`
381+
## Don't write a trivial anonymous function `x->f(x)` for a named function `f`
382382

383383
Since higher-order functions are often called with anonymous functions, it is easy to conclude
384384
that this is desirable or even necessary. But any function can be passed directly, without being

0 commit comments

Comments
 (0)