# Arrow operator -\>

**URL:** https://discourse.julialang.org/t/arrow-operator/94195
**Category:** New to Julia
**Created:** [February 7, 2023, 11:28am UTC](https://discourse.julialang.org/t/arrow-operator/94195 "2023-02-07T11:28:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)
#### Post date: [February 7, 2023, 11:28am UTC](https://discourse.julialang.org/t/arrow-operator/94195/1 "2023-02-07T11:28:20Z")

</div>

Hello,

I was reading a code and I came across the following:

```julia
r(x, δ, b) = [δ[i] - norm(x - b[:,i]) for i in 1:length(δ) ]
J(x) = ForwardDiff.jacobian(x->r(x, δ, b), x)
xs, err = gauss_newton(x->r(x, δ, b), J, x0)

```

Could you please explain what the → indicates and provide any doc I could read to understand? I am quite new to this. Thanks for the help!

Thank you

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [February 7, 2023, 11:36am UTC](https://discourse.julialang.org/t/arrow-operator/94195/2 "2023-02-07T11:36:37Z")

</div>

It creates an [anonymous function](https://docs.julialang.org/en/v1/manual/functions/#man-anonymous-functions).

---

<div class="post-metadata">

### Author: ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)
#### Post date: [February 7, 2023, 11:50am UTC](https://discourse.julialang.org/t/arrow-operator/94195/3 "2023-02-07T11:50:35Z")

</div>

Thank you!

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [February 7, 2023, 12:43pm UTC](https://discourse.julialang.org/t/arrow-operator/94195/4 "2023-02-07T12:43:02Z")

</div>

More generally if you need to know what syntax does the REPL help mode can be a good starting (and maybe end!) point:

```julia
help?> ->
search: ->

  x -> y

  Create an anonymous function mapping argument(s) x to the function body y.

  julia> f = x -> x^2 + 2x - 1
  #1 (generic function with 1 method)

  julia> f(2)
  7

```

---

<div class="post-metadata">

### Author: ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)
#### Post date: [February 7, 2023, 2:19pm UTC](https://discourse.julialang.org/t/arrow-operator/94195/5 "2023-02-07T14:19:23Z")

</div>

This and other symbols are defined [here](https://docs.julialang.org/en/v1/base/punctuation/) in the documentation.

---

<div class="post-metadata">

### Author: ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)
#### Post date: [February 8, 2023, 6:58pm UTC](https://discourse.julialang.org/t/arrow-operator/94195/6 "2023-02-08T18:58:47Z")

</div>

Thanks a lot!
