# Is it possible to programmatically construct a function capture without using \`Code.eval\_quoted\`?

**URL:** <https://forum.elixirforum.com/t/is-it-possible-to-programmatically-construct-a-function-capture-without-using-code-eval-quoted/21680>\
**Category:** Questions\
**Tags:** macros, eval, capture\
**Created:** [April 16, 2019, 9:26pm UTC](https://forum.elixirforum.com/t/is-it-possible-to-programmatically-construct-a-function-capture-without-using-code-eval-quoted/21680 "2019-04-16T21:26:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/32/2677_2.png) [@OvermindDL1](https://forum.elixirforum.com/u/OvermindDL1)\
**Post date:** [April 16, 2019, 9:52pm UTC](https://forum.elixirforum.com/t/is-it-possible-to-programmatically-construct-a-function-capture-without-using-code-eval-quoted/21680/3 "2019-04-16T21:52:59Z")

</div>

> [@Qqwy](#):
>
> case Confy.Parsers. **info** (:functions)[parser] do

Also instead of this, this is faster:

```elixir
if function_exported?(Confy.Parsers, parser, 1) do

```

```elixir
iex(2)> h function_exported?

                def function_exported?(module, function, arity)                 

  @spec function_exported?(module(), atom(), arity()) :: boolean()

Returns true if module is loaded and contains a public function with the given
arity, otherwise false.

Note that this function does not load the module in case it is not loaded.
Check Code.ensure_loaded/1 for more information.

Inlined by the compiler.

## Examples

    iex> function_exported?(Enum, :member?, 2)
    true

```

---

_[View the full topic](https://forum.elixirforum.com/t/is-it-possible-to-programmatically-construct-a-function-capture-without-using-code-eval-quoted/21680)._
