# A few numeric functions, in real Viv syntax. def area(r) { return 3.14159 * r * r } def twice(n) { return n + n } # calls another function; unary minus and parentheses def shifted(x) { return area(x) - -(1.0) } print(area(2.0)) print(twice(21.0)) print(shifted(2.0)) # SPDX-License-Identifier: MIT OR Apache-2.0 # SPDX-FileCopyrightText: 2026 The Viv authors