Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

467 lines (465 sloc) 7.794 kb
[
[
"1",
1
],
[
"2.4e9",
2400000000
],
[
"1.0E-3",
0.001
],
[
"\"a\"",
"a"
],
[
"'a'",
"a"
],
[
"'\"a\"'",
"\"a\""
],
[
"'''",
"[[ERROR]]"
],
[
"'\\''",
"'"
],
[
"\"\\\"\\\"\"",
"\"\""
],
[
"\"\\\"Hello\\\" \\\"World\\\"\"",
"\"Hello\" \"World\""
],
[
"'\"Hello\" \"World\"'",
"\"Hello\" \"World\""
],
[
"-2",
-2
],
[
"true",
true
],
[
"false",
false
],
[
"null",
null
],
[
"undefined"
],
[
"(= 1 1)",
true
],
[
"(= 1 2)",
false
],
[
"(! false)",
true
],
[
"(= true true)",
true
],
[
"(= true (! false))",
true
],
[
"(|| 2 0 3)",
3
],
[
"(&& 1 2)",
2
],
[
"(/ 4 2)",
2
],
[
"(/ 0 2)",
0
],
[
"(== (/ 2 0) Infinity)",
true
],
[
"(== (/ -2 0) -Infinity)",
true
],
[
"(== (/ 0 0) NaN)",
false
],
[
"(isNaN NaN (/ 0 0) NaN)",
true
],
[
"(isNaN NaN Infinity NaN)",
false
],
[
"(isNaN)",
true
],
[
"(isNaN \"dog\")",
true
],
[
"(isNaN \"13\")",
false
],
[
"(== (/ 64 8 6) (/ 4 3))",
true
],
[
"(= () null undefined)",
true
],
[
"(== () null undefined)",
false
],
[
"(== true (! false))",
true
],
[
"(!= true false)",
true
],
[
"(!== true (! false))",
false
],
[
"(!= true 1)",
false
],
[
"(!== true 1)",
true
],
[
"(> 1 1)",
false
],
[
"(> 2 1)",
true
],
[
"(> 1 2)",
false
],
[
"(> 3 2 1)",
true
],
[
"(> 1 2 3)",
false
],
[
"(>= 1 2)",
false
],
[
"(>= 2 2)",
true
],
[
"(>= 2 1)",
true
],
[
"(>= 3 2 3)",
false
],
[
"(>= 3 2 1)",
true
],
[
"(<= 2 1)",
false
],
[
"(<= 2 2)",
true
],
[
"(<= 1 2)",
true
],
[
"(<= 1 2 1)",
false
],
[
"(<= 1 2 3)",
true
],
[
"(array 1 2 3 \"abc\")",
[
1,
2,
3,
"abc"
]
],
[
"(concat \"a\" \"b\" \"c\")",
"abc"
],
[
"(slice 2 7 \"Hello World\")",
"llo W"
],
[
"(slice 1 \"Hello World\")",
"ello World"
],
[
"(slice \"Hello World\")",
"Hello World"
],
[
"(slice 1 2 (array 1 2 3))",
[2]
],
[
"(slice 1 (array 1 2 3))",
[2, 3]
],
[
"(slice (array 1 2 3))",
[1, 2, 3]
],
[
"(format 'hello {0}' 'world')",
"hello world"
],
[
"(filter (array (object 'prop' 5)(object 'prop' 6)(object 'prop' 5)(object 'prop' 'WAT')) {item (= item.prop 5)})",
[{"prop":5},{"prop":5}]
],
[
"(contains 'Hello World' 'WAT')",
false
],
[
"(contains 'Hello World' 'hello')",
true
],
[
"(contains 'Hello World' 'Hello')",
true
],
[
"(contains true 'Hello World' 'hello')",
false
],
[
"(contains false 'Hello World' 'hello')",
true
],
[
"(last (array 1 2 3 \"abc\"))",
"abc"
],
[
"(object \"key\" \"value\")",
{"key": "value"}
],
[
"(max 1 5 3 4 2)",
5
],
[
"()"
],
[
"[model/array]",
[
1,
2,
3
]
],
[
"(last [model/array])",
3
],
[
"(length [model/array])",
3
],
[
"(length \"string\")",
6
],
[
"(max [model/prop] 10)",
15
],
[
"(concat [model/prop] \" good sir\")",
"15 good sir"
],
[
"(! (&& [model/prop] [model/prop2]))",
false
],
[
"(/ [model/prop] [model/prop2])",
1.5
],
[
"(= 10 [model/prop2])",
true
],
[
"(= (object) [model/empty])",
false
],
[
"(= [model/prop])",
"[[ERROR]]"
],
[
"(= (+ 10 15.5) (concat \"25\" \".5\"))",
true
],
[
"(arrayEquals (array 1 2 3) (array 1 2 3))",
true
],
[
"(arrayEquals (array 1 5 3) (array 1 5 3) (array 1 5 3) (array 1 5 3))",
true
],
[
"(arrayEquals (array) (remove 1 2 3 (array 1 2 3)))",
true
],
[
"(== (+ 10 15.5) (concat \"25\" \".5\"))",
false
],
[
"(remove 1 2 3 (array 1 2 3 4))",
[4]
],
[
"(arrayEquals (array) (remove 1 2 3 (array 1 2 3 4)))",
false
],
[
"(arrayEquals (array 4 5 6) (array 1 2 3))",
false
],
[
"(fromJSON '{\"hello\":[\"world\"]}')",
{"hello":["world"]}
],
[
"(filter (array (array 1 2 3)(array 1 4 3)(array 2 2 3)){item (< 1 (length(filter item {item (= item 2)})))})",
[[2,2,3]]
],
[
"(filter (array (array 1 2 3)(array 1 4 3)(array 2 2 3)){item (= 1 (length(filter item {item (= item 2)})))})",
[[1,2,3]]
],
[
"(replace 'c1 c2 c3 c4' 'c2' '')",
"c1 c3 c4"
],
[
"(replace 'cool stuff and that' 'stuff' 'stuff stuff')",
"cool stuff stuff and that"
],
[
"(object 'thing' 5).thing",
5
],
[
"(filter (array 1 2 3 4 5 4 3 2 1) {item (= item 2)} )",
[2,2]
],
[
"(demoFunc)",
123456
],
[
"(demoFunc",
"[[ERROR]]"
],
[
"(demoFunc}",
"[[ERROR]]"
],
[
"demoFunc",
"function () { return 123456; }"
],
[
"Zomg wtf is this shit",
"[[ERROR]]"
],
[
"\"not a well formed\" string\"",
"[[ERROR]]"
],
[
"(each anArray (partial concat 'world '))",
["world a","world b","world c"]
],
[
"(each anArray {string (concat 'world ' string)})",
["world a","world b","world c"]
],
[
"(each anArray (compose length (partial concat 'world ')))",
[7,7,7]
],
[
"(each anArray {item (length (concat 'world ' item))})",
[7,7,7]
],
[
"(each anArray (compose length (partial (flip concat) 'world ')))",
[7,7,7]
],
[
"(each anArray {item (length (concat item 'world '))})",
[7,7,7]
],
[
"(fold anOtherArray 0 +)",
6
]
]
Jump to Line
Something went wrong with that request. Please try again.