数组、列表和设置函数

In

```{VALUE} in {ARRAY}

```

```person.birthMonth in [3, 6, 9]

```

不在

```{VALUE} notIn {ARRAY}

```

```person.birthMonth notIn [3, 6, 9]

```

Intersects

```{ARRAY}.intersects({ARRAY})

```

```person.favoriteColors.intersects(["red", "blue", "green"])

```

交叉

```{ARRAY}.intersection({ARRAY})

```

```person1.favoriteColors.intersection(person2.favoriteColors) = ["red", "blue", "green"]

```

子集

```{ARRAY}.subsetOf({ARRAY})

```

```person.favoriteCities.subsetOf(person.visitedCities)

```

超集

```{ARRAY}.supersetOf({ARRAY})

```

```person.eatenFoods.supersetOf(["sushi", "pizza"])

```

包括

```{ARRAY}.includes({ITEM})

```

```person.favoriteColors.includes("red")

```

Distinct

```{ARRAY}.distinct()

```

```person.orders.storeId.distinct().count() > 1

```

分组依据

```{ARRAY}.groupBy({EXPRESSION)

```

{ARRAY}

{EXPRESSION}

```orders.groupBy(storeId)

```

过滤器

```{ARRAY}.filter({EXPRESSION})

```

{ARRAY}

{EXPRESSION}

```person.filter(age >= 21)

```

地图

```array.map(expression)

```

```numbers.map(square)

```

阵列 n 中的第一个

```{ARRAY}.topN({VALUE}, {AMOUNT})

```

{ARRAY}

{VALUE}

{AMOUNT}

```orders.topN(price, 5)

```

数组中 n 的最后一个

```{ARRAY}.bottomN({VALUE}, {AMOUNT})

```

{ARRAY}

{VALUE}

{AMOUNT}

```orders.bottomN(price, 5)

```

第一项

```{ARRAY}.head()

```

```orders.topN(price, 5).head()

```