# Make a secret or black box function?

**URL:** <https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 26, 2021, 2:16pm UTC](https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017 "2021-03-26T14:16:02Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Gus\_Hart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gus_hart/32/6987_2.png) [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Post date:** [April 1, 2021, 1:49pm UTC](https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017/8 "2021-04-01T13:49:37Z")

</div>

Suppose my function was `f(x,y) = x^2+sin(y)`. Can you use this as an example to tell me how to use IRTools to generate some intermediate representation that is directly callable? I looked at the README for IRTools; I could see how code was turned into some “lower level” julia, but it wasn’t clear to me how to call/use that lower level stuff. In the README, I didn’t fully understand

```julia
julia> f = IRTools.func(ir); # Turn the new IR into a lambda

julia> f(nothing, 10, 5)

```

though that seems to be what I want to do: just cut and paste the output of @code…except that only works if you give arguments to it. Can I not define a function with the intermediate representation? If I gave that to a student, they’d be able to use it but not really understand it (i.e., black box).

---

_[View the full topic](https://discourse.julialang.org/t/make-a-secret-or-black-box-function/58017)._
