nxt.construction

Construction of types.

Typically used for functional construction of containers.

These generic factory functions prevents the need for defining separate member factory functions for each container/collection class opposite to what Rust's std.collection types define as withLength, withCapacity, etc. This adhere's to the dry-principle.

See: nxt.container and std.container.

Members

Aliases

dup
alias dup = dupShallow
Undocumented in source.

Functions

dupShallow
T dupShallow(T a)
makeOfCapacity
T makeOfCapacity(Capacity capacity)

Construct an instance of T with capacity capacity.

makeOfLength
T makeOfLength(Length length)

Construct an instance of T with length n.

makeWithElements
T makeWithElements(R elements)

Construct an instance of T with elements.

Meta