Fixed issue with Lamda
This commit is contained in:
@@ -235,7 +235,7 @@ function Library (ronin) {
|
||||
this.sqrt = Math.sqrt // calculate the square root
|
||||
|
||||
this.sq = (a) => { // calculate the square
|
||||
return a * a;
|
||||
return a * a
|
||||
}
|
||||
|
||||
this.PI = Math.PI
|
||||
|
||||
@@ -152,7 +152,7 @@ function Lisp (lib = {}, includes = []) {
|
||||
}
|
||||
|
||||
const tokenize = function (input) {
|
||||
const i = input.replace(/^\;.*\n?/gm, '').replace('λ', 'lambda ').split('"')
|
||||
const i = input.replace(/^\;.*\n?/gm, '').replace(/λ /g, 'lambda ').split('"')
|
||||
return i.map(function (x, i) {
|
||||
return i % 2 === 0
|
||||
? x.replace(/\(/g, ' ( ')
|
||||
|
||||
Reference in New Issue
Block a user