Handle top-level empty list

This commit is contained in:
greg 2017-12-04 03:01:47 -08:00
parent 107897ec97
commit 502497687a

View File

@ -55,7 +55,7 @@ impl EvaluatorState {
expr @ NumberAtom(_) => expr,
List(items) => {
if items.len() == 0 {
return Err(format!("Empty list"))
return Ok(List(items))
}
let ref first = items[0];
match first {