gocuelang.org/go/pkg/list Index | Files

package list

import "cuelang.org/go/pkg/list"

Package list contains functions for manipulating and examining lists.

Index

Functions

func Avg

func Avg(xs []*internal.Decimal) (*internal.Decimal, error)

Avg returns the average value of a non empty list xs.

func Contains

func Contains(a []cue.Value, v cue.Value) bool

Contains reports whether v is contained in a. The value must be a comparable value.

func Max

func Max(xs []*internal.Decimal) (*internal.Decimal, error)

Max returns the maximum value of a non empty list xs.

func MaxItems

func MaxItems(a []cue.Value, n int) bool

MaxItems reports whether a has at most n items.

func Min

func Min(xs []*internal.Decimal) (*internal.Decimal, error)

Min returns the minimum value of a non empty list xs.

func MinItems

func MinItems(a []cue.Value, n int) bool

MinItems reports whether a has at least n items.

func Product

func Product(xs []*internal.Decimal) (*internal.Decimal, error)

Product returns the product of a non empty list xs.

func Sum

func Sum(xs []*internal.Decimal) (*internal.Decimal, error)

Sum returns the sum of a list non empty xs.

func UniqueItems

func UniqueItems(a []cue.Value) bool

UniqueItems reports whether all elements in the list are unique.

Source Files

list.go math.go

Version
v0.0.9
Published
Sep 9, 2019
Platform
js/wasm
Imports
5 packages
Last checked
3 seconds ago

Tools for package owners.