# Is there a Julia function similar to the R function \`with\`?

**URL:** <https://discourse.julialang.org/t/is-there-a-julia-function-similar-to-the-r-function-with/91493>\
**Category:** General Usage\
**Tags:** function\
**Created:** [December 9, 2022, 8:56pm UTC](https://discourse.julialang.org/t/is-there-a-julia-function-similar-to-the-r-function-with/91493 "2022-12-09T20:56:34Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![brendaisy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brendaisy/32/32810_2.png) [@brendaisy](https://discourse.julialang.org/u/brendaisy)\
**Post date:** [December 9, 2022, 11:15pm UTC](https://discourse.julialang.org/t/is-there-a-julia-function-similar-to-the-r-function-with/91493/6 "2022-12-09T23:15:36Z")

</div>

This has been discussed before, for example [here](https://discourse.julialang.org/t/is-there-a-with-operator-or-usage-pattern/52693/11) and [here](https://discourse.julialang.org/t/unpack-named-tuples-does-anyone-know-how-to-do-it/32456).

My impulse is to accomplish something like this with function keywords, e.g.

```julia
julia> t = (a=2, b=3)
(a = 2, b = 3)

julia> foo(;a, b) = a + b
foo (generic function with 1 method)

julia> foo(;t...)
5

```

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-julia-function-similar-to-the-r-function-with/91493)._
