उदाहरणानि · worked programs

उदाहरणानि

Ten complete programs, from a one-line greeting to policy rules that explain themselves. Click any card to open it in the क्रीडास्थलम् — editable, runnable, with the टीका margin and the अभिलेख trace. The same files live in examples/ and run from the CLI with karaka run.

01 नमस्ते Hello, world The प्रारम्भः block, the लिख call form, and string interpolation with {…}. क्रीडास्थले उद्घाटय · open in playground → 02 गणना Numbers & loops A multiplication table, then a FizzBuzz over an inclusive range with अन्यथा यदि chains. क्रीडास्थले उद्घाटय · open in playground → 03 सूची च कोशः List & map सूची and कोशः: construction, mutation, index access, and the मध्ये membership test. क्रीडास्थले उद्घाटय · open in playground → 04 क्रिया Actions Positional functions, role-declared functions with defaults, default-कर्म, and recursion. क्रीडास्थले उद्घाटय · open in playground → 05 जातिः Records A जातिः with mutable and immutable fields, plus अधिकरणम् method sugar and अत्र. क्रीडास्थले उद्घाटय · open in playground → 06 हस्तान्तरणम् Direction safety अपादानम् (from) and सम्प्रदानम् (to) make transfer direction unswappable; दोषः on overdraft. क्रीडास्थले उद्घाटय · open in playground → 07 नियमः Policy & evidence A rule returning अनुमतम्/निषिद्धम् with प्रमाणम् evidence on every branch. Try the trace.
अभिलेख
क्रीडास्थले उद्घाटय · open in playground →
08 ततः Pipelines Left-to-right stages binding कर्म: text split-and-join, numeric chains, दोषः short-circuit. क्रीडास्थले उद्घाटय · open in playground → 09 गणितम् The math namespace वर्गमूलम्, घातः, निरपेक्षम्, न्यूनतमम्, अधिकतमम् — and अनन्तम् arising from overflow. क्रीडास्थले उद्घाटय · open in playground → 10 दोषः Errors as values A दोषः-returning function, the फ दोषः अस्ति predicate, .विवरणम्, and यदि-guarded recovery.
अभिलेख
क्रीडास्थले उद्घाटय · open in playground →

New to the language? The यात्रा walks the same ideas in twelve guided lessons. The full reference lives in the लेखाः.