# Mediand, std, var to accept function as first argument

**URL:** <https://discourse.julialang.org/t/mediand-std-var-to-accept-function-as-first-argument/8313>\
**Category:** General Usage\
**Tags:** statistics\
**Created:** [January 12, 2018, 11:14am UTC](https://discourse.julialang.org/t/mediand-std-var-to-accept-function-as-first-argument/8313 "2018-01-12T11:14:33Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [January 16, 2018, 11:41am UTC](https://discourse.julialang.org/t/mediand-std-var-to-accept-function-as-first-argument/8313/12 "2018-01-16T11:41:08Z")

</div>

Apparently, generators are not quite like `map`:

> [@Weird behaviour when flattening generator expression with vcat](https://discourse.julialang.org/t/weird-behaviour-when-flattening-generator-expression-with-vcat/8382/10):
>
> A very simple example showing this “problem”: a = [1 , 2, 3] g = (a[i] for i in 1:3) a = [4, 5, 6] collect(g) # Gives 4, 5, 6 # Intuitively I would have expected it to give 1, 2, 3 But this is so fundamental that I would be very surprised if it wasn’t supposed to be like that?

---

_[View the full topic](https://discourse.julialang.org/t/mediand-std-var-to-accept-function-as-first-argument/8313)._
