Question: I have a list as below and want to drop dates that are in the past, or the days that are less than today. Do I need an if statement or is there some q like way to do it?

```
q)d
1970.03.16 1980.03.17 1990.03.19 2000.03.13 2010.03.15
q)type d
14h

```

Answer: 
You can skip the function all together and do this inline.

Find indices in your list where the dates are greater than today (`d>.z.D`), then use that list to extract items from your list (`d where d>.z.D`)

```
q)d:1970.03.16 1980.03.17 1990.03.19 2020.03.13 2017.09.15
q)d>.z.D
00011b
q)d where d>.z.D
2020.03.13 2017.09.15

```
I believe I got it:

```
q)today:`date$.z.z
q)func:{[lst] lst where today<lst}
q)d
1970.03.16 1980.03.17 1990.03.19 2020.03.13 2017.09.15
q)func d
2020.03.13 2017.09.15

```