{
 "description": "Verified Soma programs. Every entry passed `soma check` (and `soma test` / `soma verify` where applicable) on the soma version below, re-run when this index was generated. Fetch `url` for the source. Filter by `domain` or `features` to find a working example of what you are about to write.",
 "soma_version": "3.2.4",
 "count": 18,
 "domains": {
  "text": 18
 },
 "features": [
  "agent",
  "cost",
  "fail",
  "guard",
  "http",
  "invariant",
  "lambda",
  "match",
  "multi_cell",
  "native",
  "pipeline",
  "service",
  "skeleton",
  "state_machine",
  "sum_type",
  "think",
  "tools",
  "try"
 ],
 "programs": [
  {
   "id": "text/acronym",
   "domain": "text",
   "title": "Acronym / initials — first letter of each word, uppercased",
   "summary": "Acronym / initials — first letter of each word, uppercased \"Portable Network Graphics\" -> \"PNG\". Splits on spaces, drops empties, and collects the uppercased first character of each word. Demonstrates building a result by accumulating substring(w, 0, 1) over a filtered word list. Run: soma run acronym.cell --signal acronym \"Portable Network Graphics\"",
   "url": "https://soma-lang.dev/corpus/text/acronym.cell",
   "repo_path": "examples/corpus/text/acronym.cell",
   "lines": 43,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Acronym",
    "AcronymTest"
   ]
  },
  {
   "id": "text/anagram",
   "domain": "text",
   "title": "Anagram check — same multiset of letters",
   "summary": "Anagram check — same multiset of letters Two strings are anagrams iff sorting their letters yields the same string. We lowercase, drop spaces, explode into a character list, sort it, and re-join. Demonstrates split/sort/join on character lists. Run: soma run anagram.cell --signal is_anagram \"listen\" \"silent\"",
   "url": "https://soma-lang.dev/corpus/text/anagram.cell",
   "repo_path": "examples/corpus/text/anagram.cell",
   "lines": 41,
   "features": [],
   "cells": [
    "Anagram",
    "AnagramTest"
   ]
  },
  {
   "id": "text/caesar",
   "domain": "text",
   "title": "Caesar cipher — shift letters using an alphabet lookup",
   "summary": "Caesar cipher — shift letters using an alphabet lookup Builds the shifted output by finding each character's position in the lowercase alphabet with index_of, rotating by the shift, and indexing back in. Non-letters pass through unchanged. Decrypt = encrypt with (26 - shift). Run: soma run caesar.cell --signal encrypt \"hello\" 3",
   "url": "https://soma-lang.dev/corpus/text/caesar.cell",
   "repo_path": "examples/corpus/text/caesar.cell",
   "lines": 49,
   "features": [],
   "cells": [
    "Caesar",
    "CaesarTest"
   ]
  },
  {
   "id": "text/csv",
   "domain": "text",
   "title": "CSV split/join — parse rows and project columns",
   "summary": "CSV split/join — parse rows and project columns Splits a CSV body into rows (by newline) and each row into fields (by comma), then maps header names to a list of record Maps. Demonstrates split on \"\\n\" and \",\", zipping headers to values, and join to re-serialize a row. Run: soma run csv.cell --signal parse \"name,age\\nAlice,30\\nBob,25\"",
   "url": "https://soma-lang.dev/corpus/text/csv.cell",
   "repo_path": "examples/corpus/text/csv.cell",
   "lines": 54,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Csv",
    "CsvTest"
   ]
  },
  {
   "id": "text/csv_to_markdown",
   "domain": "text",
   "title": "CSV to Markdown table — render rows as a pipe-delimited table",
   "summary": "CSV to Markdown table — render rows as a pipe-delimited table Turns a CSV body into a GitHub-flavored Markdown table: a header row, a separator row of dashes, then one row per data line. Demonstrates splitting on newlines and commas, and assembling lines with join + interpolation. Run: soma run csv_to_markdown.cell --signal to_table \"name,age\\nAlice,30\"",
   "url": "https://soma-lang.dev/corpus/text/csv_to_markdown.cell",
   "repo_path": "examples/corpus/text/csv_to_markdown.cell",
   "lines": 49,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "CsvToMarkdown",
    "CsvToMarkdownTest"
   ]
  },
  {
   "id": "text/number_to_words",
   "domain": "text",
   "title": "Number to words — spell out integers 0..999",
   "summary": "Number to words — spell out integers 0..999 Composes English number words from ones/teens/tens tables. Demonstrates list-literal lookup tables indexed by digit, integer division with floor, and string assembly with trim to drop stray spaces. Run: soma run number_to_words.cell --signal spell 342",
   "url": "https://soma-lang.dev/corpus/text/number_to_words.cell",
   "repo_path": "examples/corpus/text/number_to_words.cell",
   "lines": 66,
   "features": [],
   "cells": [
    "NumberToWords",
    "NumberToWordsTest"
   ]
  },
  {
   "id": "text/pad_align",
   "domain": "text",
   "title": "Padding & alignment — left/right pad to a fixed width",
   "summary": "Padding & alignment — left/right pad to a fixed width Builds padding by appending a fill character until the target width is met. Used to right-align numbers and left-align labels into fixed columns. Demonstrates while-loop string growth and truncation via substring. Run: soma run pad_align.cell --signal pad_left \"42\" 5",
   "url": "https://soma-lang.dev/corpus/text/pad_align.cell",
   "repo_path": "examples/corpus/text/pad_align.cell",
   "lines": 52,
   "features": [],
   "cells": [
    "PadAlign",
    "PadAlignTest"
   ]
  },
  {
   "id": "text/palindrome",
   "domain": "text",
   "title": "Palindrome check — punctuation- and case-insensitive",
   "summary": "Palindrome check — punctuation- and case-insensitive Strips everything but letters/digits, lowercases, then compares the cleaned string against its reverse. Demonstrates per-character filtering with s[i] and a descending range to build the reverse. Run: soma run palindrome.cell --signal is_palindrome \"A man, a plan, a canal: Panama\"",
   "url": "https://soma-lang.dev/corpus/text/palindrome.cell",
   "repo_path": "examples/corpus/text/palindrome.cell",
   "lines": 54,
   "features": [],
   "cells": [
    "Palindrome",
    "PalindromeTest"
   ]
  },
  {
   "id": "text/reverse_words",
   "domain": "text",
   "title": "Reverse word order — \"hello world\" -> \"world hello\"",
   "summary": "Reverse word order — \"hello world\" -> \"world hello\" Splits on spaces, reverses the resulting list, and re-joins. Also offers a per-word character reversal that keeps word positions. Demonstrates the difference between reversing the word list vs. reversing each word. Run: soma run reverse_words.cell --signal reverse_order \"the quick brown fox\"",
   "url": "https://soma-lang.dev/corpus/text/reverse_words.cell",
   "repo_path": "examples/corpus/text/reverse_words.cell",
   "lines": 46,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "ReverseWords",
    "ReverseWordsTest"
   ]
  },
  {
   "id": "text/rot13",
   "domain": "text",
   "title": "ROT13 — self-inverse letter rotation",
   "summary": "ROT13 — self-inverse letter rotation Rotates each letter by 13, preserving case; applying it twice restores the original. Demonstrates two alphabet lookups (lower/upper), index_of for the source position, and the involution property in a test. Run: soma run rot13.cell --signal rot13 \"Hello, World\"",
   "url": "https://soma-lang.dev/corpus/text/rot13.cell",
   "repo_path": "examples/corpus/text/rot13.cell",
   "lines": 45,
   "features": [],
   "cells": [
    "Rot13",
    "Rot13Test"
   ]
  },
  {
   "id": "text/run_length",
   "domain": "text",
   "title": "Run-length encoding — compress repeated characters",
   "summary": "Run-length encoding — compress repeated characters \"aaabbc\" -> \"a3b2c1\". Decoding walks the encoded string reading a letter followed by its digit-run count. Demonstrates per-char scanning, run counting, and reconstructing a string by repetition. Run: soma run run_length.cell --signal encode \"aaabbbcccd\"",
   "url": "https://soma-lang.dev/corpus/text/run_length.cell",
   "repo_path": "examples/corpus/text/run_length.cell",
   "lines": 66,
   "features": [],
   "cells": [
    "RunLength",
    "RunLengthTest"
   ]
  },
  {
   "id": "text/slugify",
   "domain": "text",
   "title": "Slugify — turn a title into a URL-safe slug",
   "summary": "Slugify — turn a title into a URL-safe slug Lowercases, keeps alphanumerics, turns every run of other characters into a single hyphen, and trims leading/trailing hyphens. Demonstrates a per-char accumulator with a \"last was separator\" flag to collapse runs. Run: soma run slugify.cell --signal slugify \"Hello, World! Foo--Bar\"",
   "url": "https://soma-lang.dev/corpus/text/slugify.cell",
   "repo_path": "examples/corpus/text/slugify.cell",
   "lines": 45,
   "features": [],
   "cells": [
    "Slugify",
    "SlugifyTest"
   ]
  },
  {
   "id": "text/substring_search",
   "domain": "text",
   "title": "Substring search — count and locate occurrences",
   "summary": "Substring search — count and locate occurrences Counts non-overlapping occurrences of a needle by repeatedly slicing past each match, and reports all start indices. Demonstrates index_of with a moving window via substring, and guarding against an empty needle. Run: soma run substring_search.cell --signal count_occurrences \"ababab\" \"ab\"",
   "url": "https://soma-lang.dev/corpus/text/substring_search.cell",
   "repo_path": "examples/corpus/text/substring_search.cell",
   "lines": 49,
   "features": [],
   "cells": [
    "SubstringSearch",
    "SubstringSearchTest"
   ]
  },
  {
   "id": "text/template",
   "domain": "text",
   "title": "Tiny template renderer — substitute [[key]] placeholders",
   "summary": "Tiny template renderer — substitute [[key]] placeholders Fills each [[key]] in a template with its value. Keys and values are passed as two parallel lists (a Map *parameter* can't be key-iterated like a memory slot, so explicit lists are the portable idiom). We use square brackets because Soma string interpolation owns {curly} braces. Run: soma run template.cell --signal greet \"Bob\" \"Paris\"",
   "url": "https://soma-lang.dev/corpus/text/template.cell",
   "repo_path": "examples/corpus/text/template.cell",
   "lines": 43,
   "features": [],
   "cells": [
    "Template",
    "TemplateTest"
   ]
  },
  {
   "id": "text/title_case",
   "domain": "text",
   "title": "Title case — capitalize the first letter of every word",
   "summary": "Title case — capitalize the first letter of every word Splits on spaces, uppercases each word's first character and lowercases the rest, then re-joins. Demonstrates substring slicing and per-word transforms mapped over the word list. Run: soma run title_case.cell --signal titlecase \"the QUICK brown fox\"",
   "url": "https://soma-lang.dev/corpus/text/title_case.cell",
   "repo_path": "examples/corpus/text/title_case.cell",
   "lines": 40,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "TitleCase",
    "TitleCaseTest"
   ]
  },
  {
   "id": "text/tokenizer",
   "domain": "text",
   "title": "Tokenizer — split text into normalized word tokens",
   "summary": "Tokenizer — split text into normalized word tokens Lowercases the input, replaces punctuation with spaces, then splits on whitespace and drops empty fragments. Demonstrates replace/lowercase/split and list filtering with a lambda. Run: soma run tokenizer.cell --signal tokenize \"Hello, World! Hello...\"",
   "url": "https://soma-lang.dev/corpus/text/tokenizer.cell",
   "repo_path": "examples/corpus/text/tokenizer.cell",
   "lines": 45,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Tokenizer",
    "TokenizerTest"
   ]
  },
  {
   "id": "text/vowel_count",
   "domain": "text",
   "title": "Vowel / consonant counter",
   "summary": "Vowel / consonant counter Walks each character, classifying letters as vowels or consonants and ignoring everything else. Demonstrates membership testing with contains() over a vowel set and returning a small summary Map. Run: soma run vowel_count.cell --signal analyze \"Hello World\"",
   "url": "https://soma-lang.dev/corpus/text/vowel_count.cell",
   "repo_path": "examples/corpus/text/vowel_count.cell",
   "lines": 55,
   "features": [],
   "cells": [
    "VowelCount",
    "VowelCountTest"
   ]
  },
  {
   "id": "text/word_frequency",
   "domain": "text",
   "title": "Word frequency — count occurrences of each word",
   "summary": "Word frequency — count occurrences of each word Splits a sentence into words and tallies each into a Map using a list-of words walk. Demonstrates building a frequency Map with get-or-default and in-place map writes. Run: soma run word_frequency.cell --signal frequency \"the cat the dog the\"",
   "url": "https://soma-lang.dev/corpus/text/word_frequency.cell",
   "repo_path": "examples/corpus/text/word_frequency.cell",
   "lines": 54,
   "features": [],
   "cells": [
    "WordFrequency",
    "WordFrequencyTest"
   ]
  }
 ]
}