From 16b9a4dd300fe3f53add9ad3d0f160ad1218e401 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Fri, 10 Mar 2017 13:14:16 -0500 Subject: [PATCH] Add a simple GENSYM function Resolves #18 --- src/function/builtin/GENSYM.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/function/builtin/GENSYM.java b/src/function/builtin/GENSYM.java index 6bb7587..cf58c7a 100644 --- a/src/function/builtin/GENSYM.java +++ b/src/function/builtin/GENSYM.java @@ -9,10 +9,12 @@ import sexpression.*; public class GENSYM extends LispFunction { public static final String GENSYM_PREFIX = "#G"; + private static BigInteger counter = BigInteger.ZERO; private static Symbol generateSymbol() { incrementCounter(); + return new Symbol(GENSYM_PREFIX + counter); }