# `PtcRunner.Lisp.Runtime.Callable`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/lisp/runtime/callable.ex#L1)

Dispatch helper for calling Lisp functions from Collection operations.

This module provides a unified `call/2` function that correctly dispatches
to all builtin types (normal, variadic, variadic_nonempty, multi_arity, collect)
as well as plain Erlang functions.

This solves the problem where `closure_to_fun` unwrapped variadic builtin tuples
into raw 2-arity functions, causing HOFs to fail when calling functions with
different arities:

    (map + [1 2] [10 20] [100 200])  ;; 3 args - now works
    (map + [[1 2] [3 4]])            ;; 1 arg via (apply + pair) - now works
    (filter + [0 1 2])               ;; 1 arg - now works
    (map range [1 2 3])              ;; multi_arity - now works

# `call`

```elixir
@spec call(term(), [term()]) :: term()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
