scalaria
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Scalar operations on संख्या, भिन्न, and तार्किक in function signatures.
Syntax: फलन <name>(<scalar-params>) → <scalar-type> <block>
Category#
type
Related#
Examples#
radix/corpus/scalaria/scalaria.fab (canonical · concept)#
Scalar operations on संख्या, भिन्न, and तार्किक in function signatures.
# =============================================================================
# scalaria — Scalar operations on संख्या, भिन्न, and तार्किक in function
# signatures.
# =============================================================================
#
# What this teaches:
# • Primitive type operations — demonstrates `संख्या` arithmetic, `भिन्न`
# division, `तार्किक` comparison and boolean logic in function signatures
# • Function composition — shows how scalar types compose through parameters
# and return types
#
# Common mistakes:
# • Mixing `संख्या` and `भिन्न` without explicit `↦` बदलें — primitive families have distinct type widths (SEM008).
#
# See also: संख्या, भिन्न, तार्किक
# =============================================================================
# scalaria — scalar operations on primitive types
#
# Demonstrates संख्या, भिन्न, and तार्किक parameters with arithmetic,
# comparison, and boolean logic in function signatures.
#
# GRAMMAR:
# funcDecl :← 'फलन' ident '(' paramList ')' ('→' type)? block
#
# EXPECTED OUTPUT:
# Compile-only declaration tour (no आरंभ).
fn numerica(int a, int b) → int {
return (a + b) * 2
}
fn fracta(float a, float b) → float {
return (a + b) / 2.0
}
fn comparata(int a, int b) → bool {
return a ≤ b
}
fn logica(bool a, bool b) → bool {
return not a and b
}