Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Call Expressions

This section is a work-in-progress experiment about making the book executable.

Syntax
CallExpression: callee=Expression ( args=CallArgs? )
    => CallExpression { callee: Box::new(callee), args: args.unwrap_or_default() }
CallArgs: first_arg=Expression args=( , Expression )* ,?
    => [first_arg].into_iter().chain(args).collect()

#![allow(unused)]
fn main() {
pub struct CallExpression {
    pub callee: Box<Expression>,
    pub args: Vec<Expression>,
}
}