Renderingla

in

Marks a mutable borrowed parameter.

Syntax: in <type> <name>

Category

function

Related

Examples

examples/corpus/in/in.fab (canonical · keyword)

Marks a mutable borrowed parameter.

# in — value parameter passing mode
#
# GRAMMAR:
#   paramMode :← 'in' type
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#
# BACKEND:
#   Cross-ref: functio/in-ex.fab.
#

functio summa(in lista<numerus> values) → numerus {
    redde values.summa()
}

incipit {
    fixum _ xs ← [1, 2, 3]
    nota summa(xs)
}

Expected output:

6