# Help with adding dots to functions in an expression

**URL:** <https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555>\
**Category:** General Usage\
**Created:** [September 4, 2018, 10:28pm UTC](https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555 "2018-09-04T22:28:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarah-ji](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sarah-ji](https://discourse.julialang.org/u/sarah-ji)\
**Post date:** [September 4, 2018, 10:28pm UTC](https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555/1 "2018-09-04T22:28:51Z")

</div>

Hi,

I am trying to distribute dots wherever necessary, so that I can apply an expression to a dataframe and evaluate it.

say I give it the expression:

My\_Expression = :(3 + log(x1) + 2 \* sqrt(abs(log(x2))) + asin(x4))

and I want it to return:

Returned\_Expression = :(3 + log.(x1) + 2 \* sqrt.(abs.(log.(x2))) + asin.(x4))

I have this code that works in version 0.6.3, where it successfully adds dots to every function call inside the expression, but when I tried to run it on version 0.7 it interpolates the expression with a dollar sign.

```julia
function add_dots(x::Expr)
    for argument in x.args
        if argument isa Expr
            if argument.args[1] != :*
                argument.head = :.
            end
        add_dots(argument)
        end
    end
    return x
end

```

Any thoughts on why this may be happening or what to do about it would be much appreciated!

-Sarah

---

<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:** [September 4, 2018, 10:35pm UTC](https://discourse.julialang.org/t/help-with-adding-dots-to-functions-in-an-expression/14555/2 "2018-09-04T22:35:56Z")

</div>

Have you seen the `@.` macro?
