Handle top-level empty list
This commit is contained in:
parent
6dcf5c7945
commit
07e55ca04e
@ -55,7 +55,7 @@ impl EvaluatorState {
|
|||||||
expr @ NumberAtom(_) => expr,
|
expr @ NumberAtom(_) => expr,
|
||||||
List(items) => {
|
List(items) => {
|
||||||
if items.len() == 0 {
|
if items.len() == 0 {
|
||||||
return Err(format!("Empty list"))
|
return Ok(List(items))
|
||||||
}
|
}
|
||||||
let ref first = items[0];
|
let ref first = items[0];
|
||||||
match first {
|
match first {
|
||||||
|
Loading…
Reference in New Issue
Block a user