# Trouble understanding @turbo and passing kwargs

**URL:** <https://discourse.julialang.org/t/trouble-understanding-turbo-and-passing-kwargs/99023>\
**Category:** General Usage\
**Created:** [May 17, 2023, 10:48pm UTC](https://discourse.julialang.org/t/trouble-understanding-turbo-and-passing-kwargs/99023 "2023-05-17T22:48:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex-s-gardner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex-s-gardner/32/30210_2.png) [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Post date:** [May 17, 2023, 10:48pm UTC](https://discourse.julialang.org/t/trouble-understanding-turbo-and-passing-kwargs/99023/1 "2023-05-17T22:48:13Z")

</div>

After searching for awhile I’m stuck trying to understand why

This works fine

```julia
using LoopVectorization
x = rand(10)
y = rand(10)

function turbofun(x,y)
    return x*y
end

@turbo turbofun.(x, y)

```

and so does this

```julia
function turbofun2(x, y; a=2)
    return x * y
end

@turbo turbofun2.(x, y)

```

but not this

```julia
@turbo turbofun2.(x, y; a = 1)

```

I get a cryptic error:

```julia
LoadError: TypeError: in typeassert, expected Expr, got a value of type GlobalRef

```

I suspect the answer is obvious but I’ll be damned if I can find an answer

---

<div class="post-metadata">

**Author:** ![alex-s-gardner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex-s-gardner/32/30210_2.png) [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Post date:** [May 18, 2023, 2:27am UTC](https://discourse.julialang.org/t/trouble-understanding-turbo-and-passing-kwargs/99023/2 "2023-05-18T02:27:15Z")

</div>

Chris kindly answered this here: [Trouble understanding @turbo and passing kwargs · Issue #493 · JuliaSIMD/LoopVectorization.jl · GitHub](https://github.com/JuliaSIMD/LoopVectorization.jl/issues/493#issuecomment-1552297035)
