Some readme elaboration, but mostly cons

This commit is contained in:
Ava Hahn 2023-03-09 16:03:06 -08:00
parent 928c9b91ed
commit 001e35755d
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
5 changed files with 31 additions and 29 deletions

View file

@ -17,10 +17,10 @@
use crate::segment::{Ctr, Seg};
use crate::sym::SymTable;
pub const APPEND_DOCSTRING: &str = "traverses any number of arguments collecting them into a list.
pub const CONS_DOCSTRING: &str = "traverses any number of arguments collecting them into a list.
If the first argument is a list, all other arguments are added sequentially to the end of the list contained in the first argument.";
pub fn append_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
pub fn cons_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
if let Ctr::Seg(ref s) = *ast.car {
let mut temp = s.clone();
if let Ctr::Seg(ref list) = *ast.cdr {