# '\_' as an argument in function definition

**URL:** https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708
**Category:** General Usage
**Tags:** question
**Created:** [December 16, 2023, 1:07pm UTC](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708 "2023-12-16T13:07:47Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)
#### Post date: [December 16, 2023, 9:05pm UTC](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708/6 "2023-12-16T21:05:43Z")

</div>

See for example this thread:

> [@Usage rules for bare underscores](https://discourse.julialang.org/t/usage-rules-for-bare-underscores/28858):
>
> I’ve seen a few examples where one can use a bare underscore in an expression, e.g., julia\> map(\_ -\> "hello", 1:4) 4-element Array{String,1}: "hello" "hello" "hello" "hello" julia\> ["hello" for \_ in 1:4] 4-element Array{String,1}: "hello" "hello" "hello" "hello" julia\> for \_ in 1:4 println("hello") end hello hello hello hello But of course the following doesn’t work: julia\> \_ = 2 2 julia\> \_ ERROR: all-underscore identifier used as rvalue However, I haven’t seen a…

The key terminology is that `_` cannot be used as an rvalue, which roughly means it cannot appear on the right hand-side of an assignment (or any other expression that is not an explicit assignment).

---

_[View the full topic](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708)._
