added list len, front, and back
This commit is contained in:
parent
06d30ac263
commit
7fd47c1812
5 changed files with 215 additions and 12 deletions
33
src/stl.rs
33
src/stl.rs
|
|
@ -250,6 +250,39 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"len".to_string(),
|
||||
Symbol {
|
||||
name: String::from("len"),
|
||||
args: Args::Strict(vec![Type::Seg]),
|
||||
conditional_branches: false,
|
||||
docs: append::LEN_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(append::len_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"car".to_string(),
|
||||
Symbol {
|
||||
name: String::from("car"),
|
||||
args: Args::Strict(vec![Type::Seg]),
|
||||
conditional_branches: false,
|
||||
docs: append::CAR_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(append::car_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"cdr".to_string(),
|
||||
Symbol {
|
||||
name: String::from("cdr"),
|
||||
args: Args::Strict(vec![Type::Seg]),
|
||||
conditional_branches: false,
|
||||
docs: append::CDR_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(append::cdr_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue