From 07e55ca04e4abb06a29dfa85ba7de7974ed9d664 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 {