1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-02-03 13:11:45 +02:00
ferret/pkg/stdlib/arrays/outersection.go

16 lines
523 B
Go
Raw Normal View History

package arrays
import (
"context"
2018-10-14 20:06:27 +03:00
"github.com/MontFerret/ferret/pkg/runtime/core"
)
// OUTERSECTION return the values that occur only once across all arrays specified.
2018-10-14 20:06:27 +03:00
// The element order is random.
// @param {Any[], repeated} arrays - An arbitrary number of arrays as multiple arguments (at least 2).
// @return {Any[]} - A single array with only the elements that exist only once across all provided arrays.
func Outersection(_ context.Context, args ...core.Value) (core.Value, error) {
return sections(args, 1)
}