Skip to content

ErlangList

[Source]

A list, proper when tail is None, improper otherwise.

[1, 2] is ErlangList([1, 2]), [1 | 2] is ErlangList([1], 2). The empty list has no elements and no tail.

class val ErlangList is
  Equatable[ErlangList val] ref,
  Hashable ref

Implements


Constructors

create

[Source]

new val create(
  elements': Array[ErlangTerm] val,
  tail': (ErlangTerm | None val) = None)
: ErlangList val^

Parameters

Returns


Public fields

let elements: Array[ErlangTerm] val

[Source]


let tail: (ErlangTerm | None val)

[Source]


Public Functions

is_proper

[Source]

fun box is_proper()
: Bool val

Returns


size

[Source]

fun box size()
: USize val

Returns


at

[Source]

The element at index, or None when the list is shorter.

The tail of an improper list is not an element: read it through tail.

fun box at(
  index: USize val)
: (ErlangTerm | None val)

Parameters

Returns


eq

[Source]

fun box eq(
  that: ErlangList val)
: Bool val

Parameters

Returns


hash

[Source]

fun box hash()
: USize val

Returns


ne

[Source]

fun box ne(
  that: ErlangList val)
: Bool val

Parameters

Returns