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 dba2a7a commit 2e6f248Copy full SHA for 2e6f248
base/docs/basedocs.jl
@@ -602,6 +602,32 @@ the last expression in the function body.
602
"""
603
kw"function"
604
605
+"""
606
+ x -> y
607
+
608
+Create an anonymous function mapping argument(s) `x` to the function body `y`.
609
610
+```jldoctest
611
+julia> f = x -> x^2 + 2x - 1
612
+#1 (generic function with 1 method)
613
614
+julia> f(2)
615
+7
616
+```
617
618
+Anonymous functions can also be defined for multiple argumets.
619
620
+julia> g = (x,y) -> x^2 + y^2
621
+#2 (generic function with 1 method)
622
623
+julia> g(2,3)
624
+13
625
626
627
+See the manual section on [anonymous functions](@ref man-anonymous-functions) for more details.
628
629
+kw"->"
630
631
632
return
633
0 commit comments