# Lazy.jl's \`@\>\` not working as expected when working with FileIO.jl

**URL:** <https://discourse.julialang.org/t/lazy-jls-not-working-as-expected-when-working-with-fileio-jl/21897>\
**Category:** New to Julia\
**Created:** [March 15, 2019, 5:50am UTC](https://discourse.julialang.org/t/lazy-jls-not-working-as-expected-when-working-with-fileio-jl/21897 "2019-03-15T05:50:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 15, 2019, 5:50am UTC](https://discourse.julialang.org/t/lazy-jls-not-working-as-expected-when-working-with-fileio-jl/21897/1 "2019-03-15T05:50:49Z")

</div>

```julia
using Lazy
@> begin
    1:2
    sum
end

```

the above to be the same as calling

```julia
sum(1:2)

```

Now I want to use it together with FileIO.jl

```julia
using FileIO, DataFrame, Lazy, CSV

a = DataFrame(a = 1)
CSV.write("file.csv", a)

data = @> begin    
    "file.csv"
    load
end

```

but this returns `FileIO.load` instead of `load("file.csv")`.

I can fix it by doing

```julia
data = @> "file.csv" begin    
    load
end

```

But why doesn’t the first way work?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 15, 2019, 9:16am UTC](https://discourse.julialang.org/t/lazy-jls-not-working-as-expected-when-working-with-fileio-jl/21897/2 "2019-03-15T09:16:22Z")

</div>

It is interpreting it as that you want to document the variable `load`.

```julia
julia> Meta.parse(""" "file.csv"
                       load""")
:(#= none:1 =# Core.:(@doc) "file.csv" load)

julia> var = 3
3

julia> "this is docs for var"
       var
var

help?> var
search: var Vararg varinfo TypeVar UndefVarError

  this is docs for var

```

This happens before the Lazy macro has a change to see the expression.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 15, 2019, 9:22am UTC](https://discourse.julialang.org/t/lazy-jls-not-working-as-expected-when-working-with-fileio-jl/21897/3 "2019-03-15T09:22:50Z")

</div>

I see. This would be a really bug for beginners to catch!!!
