Nbt Crafting v3 introduces functions inside of dollar expressions.
This site will describe the most important functions and the use of anonymous functions (lambdas).
Maps the container a to a new container using the lambda function l.
distinct(a, l, [b])
Removes duplicate elements of the container a, uses lambda l to get the unique element. b sets whether the first or the last duplicate element will be kept.
filter(a, l)
Removes elements of the container a, by evaluating the lambda l (true will be kept)
combine(a, b, ...)
Combines an arbitrary number of either lists or compounds.
any(a, l)
Checks if the lambda l returns true for any of the elements in a
all(a, l)
Checks if the lambda l returns true for all of the elements in a