# Documentation about using anonymous and named functions with pmap

**URL:** <https://discourse.julialang.org/t/documentation-about-using-anonymous-and-named-functions-with-pmap/19337>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 6, 2019, 11:01pm UTC](https://discourse.julialang.org/t/documentation-about-using-anonymous-and-named-functions-with-pmap/19337 "2019-01-06T23:01:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [January 7, 2019, 7:41am UTC](https://discourse.julialang.org/t/documentation-about-using-anonymous-and-named-functions-with-pmap/19337/3 "2019-01-07T07:41:59Z")

</div>

> [@zsunberg](#):
>
> it is simpler to serialize anonymous functions because they only have 1 method

This is not true in general, you can add methods to anonymous functions:

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

julia> (::typeof(f))(x::Int) = 10x

julia> f
#16 (generic function with 2 methods) # Note that f now has 2 methods

julia> f(2.)
4.0

julia> f(2)
20

```

---

_[View the full topic](https://discourse.julialang.org/t/documentation-about-using-anonymous-and-named-functions-with-pmap/19337)._
