# Function without name... feature or bug?

**URL:** <https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090>\
**Category:** Internals & Design\
**Created:** [January 1, 2018, 10:14am UTC](https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090 "2018-01-01T10:14:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gajomi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gajomi/32/7655_2.png) [@gajomi](https://discourse.julialang.org/u/gajomi)\
**Post date:** [January 1, 2018, 10:14am UTC](https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090/1 "2018-01-01T10:14:26Z")

</div>

So I accidentally evaluated something like this to the repl:

```julia
function (x)
    :lol
end

>>(::#25) (generic function with 1 method)

```

If I evaluate it repeatedly 25 increments to 27, 29, 31 etc. which I guess is kinda cool but maybe a bug or otherwise totally bizarre feature?

---

<div class="post-metadata">

**Author:** ![pkofod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pkofod/32/2179_2.png) [@pkofod](https://discourse.julialang.org/u/pkofod)\
**Post date:** [January 1, 2018, 10:17am UTC](https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090/2 "2018-01-01T10:17:20Z")

</div>

Functions without names are called anonymous functions. They’re just rarely written out in “long” form.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 1, 2018, 10:23am UTC](https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090/3 "2018-01-01T10:23:01Z")

</div>

Also see [the manual](https://docs.julialang.org/en/latest/manual/functions/#man-anonymous-functions-1) on the topic.

---

<div class="post-metadata">

**Author:** ![gajomi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gajomi/32/7655_2.png) [@gajomi](https://discourse.julialang.org/u/gajomi)\
**Post date:** [January 1, 2018, 11:38pm UTC](https://discourse.julialang.org/t/function-without-name-feature-or-bug/8090/4 "2018-01-01T23:38:25Z")

</div>

I see. Or rather, I wonder why I didn’t see before, as I am familiar with anonymous functions, but never created one using that syntax.
