# Syntax I would like: \[for i in x: ...\] in addition to \[... for i in x\]

**URL:** https://discourse.julialang.org/t/syntax-i-would-like-for-i-in-x-in-addition-to-for-i-in-x/13293
**Category:** General Usage
**Created:** [August 12, 2018, 1:33pm UTC](https://discourse.julialang.org/t/syntax-i-would-like-for-i-in-x-in-addition-to-for-i-in-x/13293 "2018-08-12T13:33:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [August 12, 2018, 1:33pm UTC](https://discourse.julialang.org/t/syntax-i-would-like-for-i-in-x-in-addition-to-for-i-in-x/13293/1 "2018-08-12T13:33:17Z")

</div>

I was thinking of idiomatic things to do in `DataFramesMeta` i realized how useful array comprehensions are for `case if` statements.

```julia
df = @linq df |> transform(c = [
       @match i begin
       1 => 1.5
       2 => 2.5
       3 => 3.5 end
       for i in :a])

```

One thing that makes this less useful though is that you don’t actually know what column is being operated on until the very end of the code block. It would be cool if I could lay our what we are iterating over _first_ then do stuff to it.
