review "qml-lisp"

This commit is contained in:
polos 2017-01-17 22:28:39 +01:00
parent 03c7a5ded5
commit 140e793040
6 changed files with 77 additions and 29 deletions

View file

@ -6,11 +6,22 @@ Item {
Component.onCompleted: {
console.log(Lisp.apply("format", [null, "~R", 123])) // (1) call CL function
// PLEASE NOTE:
//
// * for calling any CL or EQL function with max. 9 arguments, use Lisp.fun()
// * for either more than 9 arguments or passing (nested) lists, use Lisp.apply()
console.log(Lisp.apply("x:join", [["11", "55"], ":"])) // (2) nested arrays are possible
// (1) call CL function
console.log(Lisp.fun("format", false, "~R", 123))
Lisp.apply("qmsg", ["hello from QML"]) // (3) call EQL function
// (2) call EQL function
Lisp.fun("qmsg", "hello from QML")
// (3) pass list argument (note Lisp.apply)
console.log(Lisp.apply("x:join", [["11", "55"], ":"]))
// (4) nested list arguments (note Lisp.apply)
console.log(Lisp.apply("list", [[[1, 2, 3], ["a", "b", "c"], 4, 5], 6, [[7, 8], 9]]))
}
Text {