Checks whether a value appears in a collection.
Syntax: <expression> inter <collection>
Category
collection
Related
Examples
examples/corpus/inter/inter.fab (canonical · keyword)
Checks whether a value appears in a collection.
# inter — collection membership (element in set)
#
# <expr> inter <lista>
#
# GRAMMAR:
# membershipExpr :← expr 'inter' expr
#
# EXPECTED OUTPUT:
# none — stdout not pinned for this exemplum.
incipit {
fixum _ condicio ← "agens"
fixum _ aetas ← 21
# Basic inter with textus lista
si condicio inter ["pendens", "agens", "pausa"] {
nota "condicio valida"
}
# inter with numeric lista
si aetas inter [18, 21, 65] {
nota "aetas insignis"
}
nota "exempla inter"
}