From 61a0ccc069585ed2ade17a4d061ce409949648b7 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 8 May 2022 10:20:26 +0800 Subject: [PATCH] refactor --- src/turtle/_impl/_lsystem_comm.scad | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/turtle/_impl/_lsystem_comm.scad b/src/turtle/_impl/_lsystem_comm.scad index f605d3da..c87b9352 100644 --- a/src/turtle/_impl/_lsystem_comm.scad +++ b/src/turtle/_impl/_lsystem_comm.scad @@ -1,8 +1,7 @@ use <../../util/rand.scad>; function _assoc_lookup(array, key) = - let(idx = search([key], array)[0]) - array[idx][1]; + array[search([key], array)[0]][1]; // It doesn't use recursion to avoid recursion error. function _join(str_lt) =