From 502497687ab8904f6fe4f59a8c9d152c6680b029 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 4 Dec 2017 03:01:47 -0800 Subject: [PATCH] Handle top-level empty list --- src/rukka_lang/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rukka_lang/mod.rs b/src/rukka_lang/mod.rs index 4245197..e441b4a 100644 --- a/src/rukka_lang/mod.rs +++ b/src/rukka_lang/mod.rs @@ -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 {