inter
Translation status: English reader-locale proof. Code fences render through the en pipeline; prose is canonical Latin.
Checks whether a value appears in a collection.
Syntax: <expression> inter <collection>
Category#
collection
Related#
Examples#
radix/corpus/inter/inter.fab (canonical · keyword)#
Checks whether a value appears in a collection.
# =============================================================================
# inter — Checks whether a value appears in a collection
# =============================================================================
#
# What this teaches:
# • Checks whether a value appears in a collection.
# • Related keywords: intra
#
# Common mistakes:
# • Using `inter` with a non-collection right operand — `inter` checks membership in a lista, tabula, or copia, not a scalar comparison.
#
# See also: intra
# =============================================================================
# inter — collection membership (element in set)
#
# <expr> inter <lista>
#
# GRAMMAR:
# membershipExpr :← expr 'inter' expr
#
# EXPECTED OUTPUT:
# none — stdout not pinned for this exemplum.
main {
const _ condicio ← "agens"
const _ aetas ← 21
# Basic inter with textus lista
if condicio between ["pendens", "agens", "pausa"] {
print "condicio valida"
}
# inter with numeric lista
if aetas between [18, 21, 65] {
print "aetas insignis"
}
print "exempla inter"
}