1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-17 01:32:22 +02:00

Bug/#142 clauses and statements (#148)

This commit is contained in:
Tim Voronov
2018-10-28 01:45:26 -04:00
committed by GitHub
parent e6fd33ac1d
commit 3472630e6f
72 changed files with 2828 additions and 2185 deletions

View File

@ -3,7 +3,6 @@ package arrays
import (
"context"
"github.com/MontFerret/ferret/pkg/runtime/collections"
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
)
@ -30,14 +29,5 @@ func Unique(_ context.Context, args ...core.Value) (core.Value, error) {
return values.NewArray(0), nil
}
iterator, err := collections.NewUniqueIterator(
collections.NewDefaultIndexedIterator(arr),
collections.DefaultValueVar,
)
if err != nil {
return values.None, err
}
return toArray(iterator)
return ToUniqueArray(arr), nil
}