Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

size

container.hash_map.size

 i32
[Redefinition of  container.Map.size]
number of entries in this map

redefines:

Applicable universe features

These are features in universe, that have an argument with a type constraint that matches this features type and can therefore be used with it.
(T 
type
:
property.equatable, a T, b T)
 => 
bool
equals -- feature that compares two values using the equality relation
defined in their type
(T 
type
:
property.hashable, a T)
 => 
u64
hash of a value
(T 
type
:
property.equatable, a T, b T)
 => 
bool
infix = -- infix operation as short-hand for 'equals'
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come strictly before other?
infix <= -- infix operation as short-hand for 'lteq'
(T 
type
:
property.orderable, a T, b T)
 => 
order
three-way comparison between this and other.

result is < 0 if this < other
result is > 0 if this > other
result is = 0 if this = other
(T 
type
:
property.equatable, a T, b T)
 => 
bool
infix = -- infix operation as short-hand for 'equals'
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come strictly after other?
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come after other?
is `a` contained in `Set` `s`?

This should usually be called using type inference as in

is `a` not contained in `Set` `s`?

This should usually be called using type inference as in

(T 
type
:
property.equatable, a T, b T)
 => 
bool
infix ≟ -- infix operation as short-hand for 'equals'
infix ≤ -- infix operation as short-hand for 'lteq'
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come after other?
(T 
type
:
property.orderable, a T, b T)
 => 
order
three-way comparison between this and other.

result is < 0 if this < other
result is > 0 if this > other
result is = 0 if this = other
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come strictly before other?
(T 
type
:
property.orderable, a T, b T)
 => 
bool
does this come strictly after other?
(T 
type
:
property.partially_orderable, a T, b T)
 => 
bool
lteq -- feature that compares two values using the lteq relation
defined in their type
(T 
type
:
property.orderable, a T, b T)
 => 
T
maximum of two values
memoize `f`.
wraps f so that f will only be called once for every unique input.

The term "memoization" was coined by Donald Michie in 1968 and
is derived from the Latin word "memorandum" ("to be remembered"),
usually truncated as "memo" in American English, and thus carries
the meaning of "turning a function into something to be remembered".
https://en.wikipedia.org/wiki/Memoization

example:

(T 
type
:
property.orderable, a T, b T)
 => 
T
minimum of two values
0.095dev (2025-09-09 14:29:31 GIT hash 98644f8f651c2101a0730cfe31c5807993b7603b built by fridi@fzen)