Skip to main content

extract_args

Macro extract_args 

Source
macro_rules! extract_args {
    ($self:expr, $args:ident, $var:ident) => { ... };
    ($self:expr, $args:ident, $var:ident, $($rest:ident),+) => { ... };
}
Expand description

Macro to extract arguments from a Lisp list using car/cdr.

This macro extracts multiple arguments from a list, shadowing the args variable after each extraction.

ยงExample

extract_args!(self, args, a, b, c) extracts three arguments from args.