Feel.Value.List (feel v0.1.0)

Copy Markdown View Source

The FEEL type list (DMN 1.6, section 10.3.2.5): an ordered sequence of values.

A list may hold values of different types, and may hold null. It is represented as an Elixir list. The type of a list is list<T>, where T is the least type that all its elements conform to, or Any when they are unrelated.

Summary

Functions

Returns the descriptor of list<T> for elements of type element.

Returns true for a list.

Types

t()

@type t() :: [Feel.Value.t()]

Functions

type(element)

@spec type(Feel.Type.t()) :: Feel.Type.t()

Returns the descriptor of list<T> for elements of type element.

value?(term)

@spec value?(term()) :: boolean()

Returns true for a list.

The elements are not examined; use Feel.Type.instance?/2 for that.

iex> Feel.Value.List.value?([1, nil, "a"])
true
iex> Feel.Value.List.value?(%{})
false