# How to specify function name specific functions? Is that possible?

**URL:** <https://discourse.julialang.org/t/how-to-specify-function-name-specific-functions-is-that-possible/41218>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 11, 2020, 6:42pm UTC](https://discourse.julialang.org/t/how-to-specify-function-name-specific-functions-is-that-possible/41218 "2020-06-11T18:42:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Post date:** [June 11, 2020, 6:42pm UTC](https://discourse.julialang.org/t/how-to-specify-function-name-specific-functions-is-that-possible/41218/1 "2020-06-11T18:42:22Z")

</div>

I currently have functions like

```julia
function AnalyticalExpectation(distribution::Normal, g::Function)  
    if(g==log)
        return ...
    else
        println("Not yet implemented")
    end
end

```

Is there a way to make this

```julia
function AnalyticalExpectation(distribution::Normal, g::IsLog)  
        return ...
end

```

instead?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [June 11, 2020, 6:45pm UTC](https://discourse.julialang.org/t/how-to-specify-function-name-specific-functions-is-that-possible/41218/2 "2020-06-11T18:45:02Z")

</div>

You could do `f(distribution::Normal, g::typof(log))`

---

<div class="post-metadata">

**Author:** ![janrpeters](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Post date:** [June 11, 2020, 6:48pm UTC](https://discourse.julialang.org/t/how-to-specify-function-name-specific-functions-is-that-possible/41218/3 "2020-06-11T18:48:11Z")

</div>

Awesome! Thanks! You just gotta love the Julia community … solutions in under 3min! Wow!
