diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 8edb2c8..0fdfacc 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -221,6 +221,10 @@ function Library (ronin) { return arg } + this.str = (...args) => { + return args.reduce((acc, val) => { return acc + val }, '') + } + this.test = (name, a, b) => { if (Array.isArray(a)) { // TODO: make testing more solid diff --git a/examples/benchmark.lisp b/examples/benchmark.lisp index 75f3d77..478e06c 100644 --- a/examples/benchmark.lisp +++ b/examples/benchmark.lisp @@ -44,4 +44,8 @@ (def addOne (lambda (a) (add a 1))) (test "def - value" aaa 123) (test "def - func" (addOne 4) 5) + +; Generics + + (test "str" (str 1 4 "-" (add 3 4) ".jpg") "14-7.jpg") ) \ No newline at end of file