Function
Type
Test
Result

ALL
ALL([false, 0], FUNCTION(value, NOT(value)))
TRUE

AMAP(["dfdce412-e692-4d45-9cad-c3d796a0ea0b", "a80cbb27-15c5-448a-be2b-cfd7950c048a"], FUNCTION(id, PROPERTY(DBGET(id), "stc_name")))
["Singapore","United States of America"]

ANY
ANY([false, 1], FUNCTION(value, NOT(value)))
TRUE

ARGS2ARRAY("lorem", "ipsum")
["lorem","ipsum"]

ARR
ARR()
[null]

ASSIGN({"lorem": 42}, {"ipsum": 43})
{"lorem":42,"ipsum":43}

AT
AT(["a", "b", "c", "d", "e"], [0, 2, 4])
["a","c","e"]

CLONE({"lorem": 42, "ipsum": 43})
{"lorem":42,"ipsum":43}

CLONE({"lorem": 42, "ipsum": {"dolor": 43, "sit": 44, "amet": 45}})
{"lorem":42,"ipsum":{"dolor":43,"sit":44,"amet":45}}

COLLECT([1, 2, 3], FUNCTION(value, value * 2))
[2,4,6]

COMPACT([0, 1, false, 2, "", 3])
[1, 2, 3]

CONCAT(["lorem", "ipsum", "dolor"], ["sit", "amet"])
["lorem","ipsum","dolor","sit","amet"]

CONTAINS({1: "lorem", 2: "ipsum", 3: "dolor"}, "lorem")
TRUE

COUNTBY([4.2, 4.3, 5.4], FUNCTION(value, FLOOR(value)))
{"4":2,"5":1}

COUNTIN(["lorem", "lorem", "ipsum", "dolor"], "lorem")
2

DEFAULTS({"lorem": 42}, {"lorem": 41, "ipsum": 43})
{"lorem":42,"ipsum":43}

DETECT([1, 2, 3], FUNCTION(value, ISEVEN(value)))
2

DIFFERENCE([1, 2, 3, 4, 5], [2, 4, 8])
[1,3,5]

DROP([1, 2, 3, 4, 5], FUNCTION(value, value < 4))
[4,5]

ENUMERATION(5)
[1,2,3,4,5]

EVERY([false, 1], FUNCTION(value, NOT(value)))
FALSE

FILTER([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
[2,4]

FINDINDEX([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
1

FINDKEY({"lorem": 1, "ipsum": 2, "dolor": 3}, FUNCTION(value, ISEVEN(value)))
ipsum

FINDLASTINDEX([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
3

FIRST([1, 2, 3, 4, 5], FUNCTION(value, value < 4))
[1,2,3]

FLATTEN([1, [2], [3, [[4]]]])
[1,2,3,4]

FOLDL([1, 2, 3], FUNCTION(sum, num, sum + num))
6

FOLDR([[1, 2], [3, 4], [5, 6]], FUNCTION(a, b, CONCAT(a, b)))
[5,6,3,4,1,2]

GROUPBY(["one", "two", "three"], "length")
{ '3': ['one', 'two'], '5': ['three'] }

IDENTITY("lorem", "ipsum", "dolor")
lorem

INDEXBY([{"lorem": "left", "ipsum": "top"}, {"lorem": "right", "ipsum": "bottom"}], "lorem")
{"left":{"lorem":"left","ipsum":"top"},"right":{"lorem":"right","ipsum":"bottom"}}

INDEXOF([1, 1, 2, 2, 3, 3], 2, true)
2

INITIAL([1, 2, 3, 4, 5], FUNCTION(value, value > 2))
[1,2]

INJECT([1, 2, 3], FUNCTION(sum, num, sum + num))
6

INTERSECTION([1, 2, 3], [2, 3, 4], [3, 4, 5])
[3]

INVERT({"lorem": 1, "ipsum": 2, "dolor": 3})
{"1":"lorem","2":"ipsum","3":"dolor"}

JOIN(["lorem", "ipsum", "dolor"], "*")
lorem*ipsum*dolor

KEYS({"lorem": 1, "ipsum": 2, "dolor": 3})
["lorem","ipsum","dolor"]

LAST([1, 2, 3, 4, 5], FUNCTION(value, value > 2))
[3,4,5]

LASTINDEXOF([1, 2, 3, 1, 2, 3], 2, 3)
1

MAP
MAP([1, 2, 3], FUNCTION(value, value * 2))
[2,4,6]

MERGE({"lorem": {"ipsum": 1)}, {"lorem": {"dolor": 2}})
{"lorem":{"ipsum":1,"dolor":2}}

{"lorem": 1, "ipsum": 2}
{"lorem":1,"ipsum":2}

OMIT({"lorem": 1, "ipsum": 2, "dolor": 3}, ["dolor"])
{"lorem":1,"ipsum":2}

PAIRS({"lorem": 1, "ipsum": 2, "dolor": 3})
[["lorem",1],["ipsum",2],["dolor",3]]

PICK({"lorem": 1, "ipsum": 2, "dolor": 3}, ["dolor"])
{"dolor":3}

PLUCK([{"lorem": 1, "ipsum": 2}, {"lorem": 3, "ipsum": 4}], "lorem")
[1,3]

PULL([1, 2, 3, 1, 2, 3], 2, 3)
[1, 1]

RANGE(10, 50, 5)
[10,15,20,25,30,35,40,45]

REDUCE([1, 2, 3], FUNCTION(sum, num, sum + num))
6

REDUCERIGHT([[1, 2], [3, 4], [5, 6]], FUNCTION(a, b, CONCAT(a, b)))
[5,6,3,4,1,2]

REJECT([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
[1,3,5]

REMOVE([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
[2,4]

REST([1, 2, 3, 4, 5], FUNCTION(value, value < 4))
[4,5]

SELECT([1, 2, 3, 4, 5], FUNCTION(value, ISEVEN(value)))
[2,4]

SHUFFLE([1, 2, 3, 4, 5])
[5,1,3,2,4]

SIZE([1, 2, 3, 4, 5])
5

SOME([{"a": 1, "b": 2}, {"a": 3, "b": 4}], FUNCTION(value, value.a = 3))
TRUE

SORTBY([1, 2, 3], FUNCTION(value, SIN(value)))
[3,1,2]

SORTEDINDEX([10, 20, 40], 30)
2

TAIL([1, 2, 3, 4, 5], FUNCTION(value, value < 4))
[4,5]

TIMES(3, FUNCTION(index, index ^ 2))
[0,1,4]

UNION([1, 2, 3], [2, 3, 4], [3, 4, 5])
[1,2,3,4,5]

UNIQ([1, 1, 2, 2, 3, 3])
[1,2,3]

UNZIP(["lorem", "ipsum"], ["a", "b"], [1, 2])
[["lorem","a",1],["ipsum","b",2]]

VALUES({"lorem": 1, "ipsum": 2, "dolor": 3})
[1,2,3]

WHERE([{"a": 1, "b": 2}, {"a": 3, "b": 4}], {"a": 3})
[{"a":3,"b":4}]

WITHOUT([1, 2, 3, 4, 5], 2, 4)
[1,3,5]

ZIP
ZIP(["lorem", "ipsum"], ["a", "b"], [1, 2])
[["lorem","a",1],["ipsum","b",2]]

ZIPOBJECT(["lorem", "ipsum"], [1, 2])
{"lorem":1,"ipsum":2}


Copyright © Sutoiku, Inc. 2012, 2014 | Excel is a registered trademark of Microsoft Corporation | Google Spreadsheets is a trademark of Google, Inc.