From 3d5a17431e0353e785f638030bb76d5d44d984de Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 17:23:39 +0200 Subject: [PATCH] prefixing fn to __fn for scope safety --- desktop/sources/scripts/lisp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 2d8f16e..4fd0f1e 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -60,7 +60,7 @@ function Lisp (input, lib) { return interpret(input[2], new Context(lambdaScope, context)) } }, - fn: function (input, context) { + __fn: function (input, context) { return async function () { const lambdaArguments = arguments const lambdaScope = [].reduce(function (acc, x, i) { @@ -121,7 +121,7 @@ function Lisp (input, lib) { if (token === undefined) { return list.pop() } else if (token === '\'(') { - input.unshift('fn') + input.unshift('__fn') list.push(parenthesize(input, [])) return parenthesize(input, list) } else if (token === '(') {