# No-op function?

**URL:** <https://discourse.julialang.org/t/no-op-function/58392>\
**Category:** General Usage\
**Created:** [April 1, 2021, 8:45pm UTC](https://discourse.julialang.org/t/no-op-function/58392 "2021-04-01T20:45:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [April 1, 2021, 8:45pm UTC](https://discourse.julialang.org/t/no-op-function/58392/1 "2021-04-01T20:45:58Z")

</div>

Is there such a thing as a function that is a no-op (and returns `nothing` which I guess is always mandatory) for any arguments?

Basically

`noop(args...; kwargs...) = nothing`

I’m wondering if either

1. something like this exists or
2. this is something so simple that it’s not worth bothering to put in the standard library
3. this isn’t something you should ever do because [reasons]

I suspect it’s most likely #4 😄. This is in the context of a function with a function-typed arg that I’d like to have no-op as the default.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [April 1, 2021, 8:54pm UTC](https://discourse.julialang.org/t/no-op-function/58392/2 "2021-04-01T20:54:53Z")

</div>

As of 4 hours ago, you can do this on 1.7-DEV with `Returns(nothing)`. ([#39794](https://github.com/JuliaLang/julia/pull/39794))

---

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [April 1, 2021, 8:56pm UTC](https://discourse.julialang.org/t/no-op-function/58392/3 "2021-04-01T20:56:00Z")

</div>

Well, I’ll be darned! 😆

Thanks!
