mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
22 lines
363 B
Go
22 lines
363 B
Go
package collections
|
|
|
|
import (
|
|
"context"
|
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
|
)
|
|
|
|
type (
|
|
Reducer interface {
|
|
Reduce(collection core.Value, value core.Value) (core.Value, error)
|
|
}
|
|
|
|
Reducible interface {
|
|
Reduce() Reducer
|
|
}
|
|
|
|
ReducibleExpression interface {
|
|
core.Expression
|
|
Reduce(ctx context.Context, scope *core.Scope) (Reducer, error)
|
|
}
|
|
)
|