# Method chaining with arguments to imitate unix piping?

**URL:** <https://discourse.julialang.org/t/method-chaining-with-arguments-to-imitate-unix-piping/9308>\
**Category:** General Usage\
**Created:** [February 25, 2018, 5:15am UTC](https://discourse.julialang.org/t/method-chaining-with-arguments-to-imitate-unix-piping/9308 "2018-02-25T05:15:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 25, 2018, 6:43am UTC](https://discourse.julialang.org/t/method-chaining-with-arguments-to-imitate-unix-piping/9308/2 "2018-02-25T06:43:43Z")

</div>

> [@iwelch](#):
>
> I believe that instead of `f(g(x))`, this means I can use `g(x) |> f()`

Nope, this means that you can use `g(x) |> f`, ie you use `f` as a function.

> [@iwelch](#):
>
> accomplish something […] akin to Unix piping

You can of course do that, but you have to make the second argument of `|>` a closure, eg `s -> ismatch(regex, s)`.

---

_[View the full topic](https://discourse.julialang.org/t/method-chaining-with-arguments-to-imitate-unix-piping/9308)._
