pub fn def_keyword() -> impl BindingMonad<Binding=SyntaxCompiler> {
    // Create the binding expression
    // 
    //   This retrieves the arguments, binds the value, allocates a cell and associates the name with 
    //   the cell and generates a list containing (cell_binding, value_binding) to pass to the compiler
    //   
    get_expression_arguments().and_then(|args: ListTuple<(AtomId, CellRef)>| {
        // The arguments are just the name and the value
        let ListTuple((name, value)) = args;

        // Bind the value
        bind(value).and_then(move |value| {
            // Allocate the cell to store the value in
            allocate_cell().and_then(move |cell_id| {
                // Define the symbol to map to this cell
                let value           = value.clone();
                let cell_type       = value.reference_type();
                let cell: CellRef   = SafasCell::FrameReference(cell_id, 0, cell_type).into();

                define_symbol_value(name, cell.clone()).and_then(move |_| {
                    let value   = value.clone();
                    let cell    = cell.clone();

                    // Export the atom into the environment
                    export_symbol(name).and_then(move |_| {
                        // Binding contains the frame reference cell and the bound value
                        wrap_binding(SafasCell::list_with_cells(vec![cell.clone(), value.clone()]))
                    })
                })
            })
        })
    }).map_result(|def_binding| {
        // Fetch the frame reference and the bound value from the value
        let bound_values: ListTuple<(FrameReference, CellRef)>  = def_binding.clone().try_into()?;
        let ListTuple((FrameReference(_, _, _), value))         = bound_values;

        let reference_type                                      = value.reference_type();

        // Create the action compiler (load the value and store in the cell)
        let compiler = |def_binding: CellRef| -> Result<_, BindError> {
            // Fetch the frame reference and the bound value from the value
            let bound_values: ListTuple<(FrameReference, CellRef)>  = def_binding.clone().try_into()?;
            let ListTuple((FrameReference(cell, _, _), value))      = bound_values;

            // Compile the actions to generate the value
            let mut actions                                     = compile_statement(value.clone())?;

            // Store in the cell
            actions.push(Action::StoreCell(cell));

            Ok(actions)
        };

        Ok(SyntaxCompiler::with_compiler_and_reftype(compiler, def_binding, reference_type))
    })
}
///
/// Creates the syntax definition for the 'def' keyword
/// 
/// ```(def <name> <value>)```
/// 
/// Assigns `<value>` to the atom called `<name>`. It is possible to redefine an existing atom. The value
/// will be available to everything in the same frame after this statement.
///


Assigns `` to the atom called ``. It is possible to redefine an existing atom. The value
will be available to everything in the same frame after this statement.
Assigns ` ` to the atom called ` ` . It is possible to redefine an existing atom . The value will be available to everything in the same frame after this statement .
pub fn def_keyword() -> impl BindingMonad<Binding=SyntaxCompiler> {
    // Create the binding expression
    // 
    //   This retrieves the arguments, binds the value, allocates a cell and associates the name with 
    //   the cell and generates a list containing (cell_binding, value_binding) to pass to the compiler
    //   
    get_expression_arguments().and_then(|args: ListTuple<(AtomId, CellRef)>| {
        // The arguments are just the name and the value
        let ListTuple((name, value)) = args;
        // Bind the value
        bind(value).and_then(move |value| {
            // Allocate the cell to store the value in
            allocate_cell().and_then(move |cell_id| {
                // Define the symbol to map to this cell
                let value           = value.clone();
                let cell_type       = value.reference_type();
                let cell: CellRef   = SafasCell::FrameReference(cell_id, 0, cell_type).into();
                define_symbol_value(name, cell.clone()).and_then(move |_| {
                    let value   = value.clone();
                    let cell    = cell.clone();
                    // Export the atom into the environment
                    export_symbol(name).and_then(move |_| {
                        // Binding contains the frame reference cell and the bound value
                        wrap_binding(SafasCell::list_with_cells(vec![cell.clone(), value.clone()]))
                    })
                })
            })
        })
    }).map_result(|def_binding| {
        // Fetch the frame reference and the bound value from the value
        let bound_values: ListTuple<(FrameReference, CellRef)>  = def_binding.clone().try_into()?;
        let ListTuple((FrameReference(_, _, _), value))         = bound_values;
        let reference_type                                      = value.reference_type();
        // Create the action compiler (load the value and store in the cell)
        let compiler = |def_binding: CellRef| -> Result<_, BindError> {
            // Fetch the frame reference and the bound value from the value
            let bound_values: ListTuple<(FrameReference, CellRef)>  = def_binding.clone().try_into()?;
            let ListTuple((FrameReference(cell, _, _), value))      = bound_values;
            // Compile the actions to generate the value
            let mut actions                                     = compile_statement(value.clone())?;
            // Store in the cell
            actions.push(Action::StoreCell(cell));
            Ok(actions)
        };
        Ok(SyntaxCompiler::with_compiler_and_reftype(compiler, def_binding, reference_type))
    })
}
pub fn def_keyword ( ) -> impl BindingMonad < Binding = SyntaxCompiler > { // Create the binding expression //  //   This retrieves the arguments, binds the value, allocates a cell and associates the name with  //   the cell and generates a list containing (cell_binding, value_binding) to pass to the compiler //    get_expression_arguments ( ) . and_then ( | args : ListTuple < ( AtomId , CellRef ) > | { // The arguments are just the name and the value let ListTuple ( ( name , value ) ) = args ; // Bind the value bind ( value ) . and_then ( move | value | { // Allocate the cell to store the value in allocate_cell ( ) . and_then ( move | cell_id | { // Define the symbol to map to this cell let value = value . clone ( ) ; let cell_type = value . reference_type ( ) ; let cell : CellRef = SafasCell :: FrameReference ( cell_id , 0 , cell_type ) . into ( ) ; define_symbol_value ( name , cell . clone ( ) ) . and_then ( move | _ | { let value = value . clone ( ) ; let cell = cell . clone ( ) ; // Export the atom into the environment export_symbol ( name ) . and_then ( move | _ | { // Binding contains the frame reference cell and the bound value wrap_binding ( SafasCell :: list_with_cells ( vec ! [ cell clone ( ) value clone ( ) ] ) ) } ) } ) } ) } ) } ) . map_result ( | def_binding | { // Fetch the frame reference and the bound value from the value let bound_values : ListTuple < ( FrameReference , CellRef ) > = def_binding . clone ( ) . try_into ( ) ? ; let ListTuple ( ( FrameReference ( _ , _ , _ ) , value ) ) = bound_values ; let reference_type = value . reference_type ( ) ; // Create the action compiler (load the value and store in the cell) let compiler = | def_binding : CellRef | -> Result < _ , BindError > { // Fetch the frame reference and the bound value from the value let bound_values : ListTuple < ( FrameReference , CellRef ) > = def_binding . clone ( ) . try_into ( ) ? ; let ListTuple ( ( FrameReference ( cell , _ , _ ) , value ) ) = bound_values ; // Compile the actions to generate the value let mut actions = compile_statement ( value . clone ( ) ) ? ; // Store in the cell actions . push ( Action :: StoreCell ( cell ) ) ; Ok ( actions ) } ; Ok ( SyntaxCompiler :: with_compiler_and_reftype ( compiler , def_binding , reference_type ) ) } ) }
Creates the syntax definition for the 'def' keyword
```(def <name> <value>)```
Creates the syntax definition for the ' def ' keyword ` ` ` ( def <name > <value > ) ` ` `