# How to compile the following function

**URL:** <https://discourse.julialang.org/t/how-to-compile-the-following-function/8729>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [February 1, 2018, 5:55am UTC](https://discourse.julialang.org/t/how-to-compile-the-following-function/8729 "2018-02-01T05:55:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlxG78](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@AlxG78](https://discourse.julialang.org/u/AlxG78)\
**Post date:** [February 1, 2018, 5:55am UTC](https://discourse.julialang.org/t/how-to-compile-the-following-function/8729/1 "2018-02-01T05:55:11Z")

</div>

f(a::Real, b::Real; key1=true, key2=“hello”) = 1

precompile(f, (Int64,Int64,Dict{Symbol,Any}))

return false

how it is done to return true?

---

<div class="post-metadata">

**Author:** ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)\
**Post date:** [February 5, 2018, 11:06pm UTC](https://discourse.julialang.org/t/how-to-compile-the-following-function/8729/2 "2018-02-05T23:06:20Z")

</div>

`precompile(f, (Int64,Int64))`

(Keyword arguments are hidden, and aren’t supported for explicit declaration in precompile – and wouldn’t be a Dict anyways. However, the above anyways will compile any child functions – including the keyword call.)
