The following code 

```
a=1:1:10
collect(a)
a[a.>4]

```

returns the expected 

```
6-element Array{Int64,1}:
  5
  6
  7
  8
  9
 10

```

Whereas, 

```
a[(a.>4) & (a.<8)] 

```

returns

```
MethodError: no method matching &(::Int64, ::StepRange{Int64,Int64})

```

How can this be resolved?