Skip to main content

NativeFn

Type Alias NativeFn 

Source
pub type NativeFn<const N: usize> = fn(&Lisp<N>, ArenaIndex) -> Result<ArenaIndex, ArenaError>;
Expand description

A native function that can be called from Lisp.

Native functions receive:

  • A reference to the Lisp context
  • The argument list as an ArenaIndex (a Lisp list)

They return an ArenaResult containing the result.