{
 "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": 17,
 "domains": {
  "data": 17
 },
 "features": [
  "agent",
  "cost",
  "fail",
  "guard",
  "http",
  "invariant",
  "lambda",
  "match",
  "multi_cell",
  "native",
  "pipeline",
  "service",
  "skeleton",
  "state_machine",
  "sum_type",
  "think",
  "tools",
  "try"
 ],
 "programs": [
  {
   "id": "data/ab_test",
   "domain": "data",
   "title": "A/B test rollup: per-variant conversions and lift over control",
   "summary": "A/B test rollup: per-variant conversions and lift over control. Demonstrates filtering a List<Map> by group, count over a predicate lambda, and computing a derived percentage with integer-aware floor division.",
   "url": "https://soma-lang.dev/corpus/data/ab_test.cell",
   "repo_path": "examples/corpus/data/ab_test.cell",
   "lines": 60,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "AbTest",
    "AbTestTests"
   ]
  },
  {
   "id": "data/basket_analysis",
   "domain": "data",
   "title": "Market-basket analysis: transactions of (order, product) lines",
   "summary": "Market-basket analysis: transactions of (order, product) lines. Compute product popularity, basket sizes per order, and the average order value. Demonstrates group_by to size baskets, agg for revenue, and count_by.",
   "url": "https://soma-lang.dev/corpus/data/basket_analysis.cell",
   "repo_path": "examples/corpus/data/basket_analysis.cell",
   "lines": 61,
   "features": [
    "pipeline"
   ],
   "cells": [
    "Basket",
    "BasketTests"
   ]
  },
  {
   "id": "data/cohort_retention",
   "domain": "data",
   "title": "Cohort analysis: bucket users by signup month, then measure how many were still active in a later month",
   "summary": "Cohort analysis: bucket users by signup month, then measure how many were still active in a later month. Demonstrates inner_join across two tables, group_by + agg, and computing a derived retention-rate column with map().",
   "url": "https://soma-lang.dev/corpus/data/cohort_retention.cell",
   "repo_path": "examples/corpus/data/cohort_retention.cell",
   "lines": 59,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Cohort",
    "CohortTests"
   ]
  },
  {
   "id": "data/csv_transform",
   "domain": "data",
   "title": "CSV-shaped transform: clean -> derive -> project",
   "summary": "CSV-shaped transform: clean -> derive -> project. Each row is a Map as if parsed from a CSV header. Demonstrates a block-lambda map(...) that derives new columns, filter for valid rows, and select to project the output shape.",
   "url": "https://soma-lang.dev/corpus/data/csv_transform.cell",
   "repo_path": "examples/corpus/data/csv_transform.cell",
   "lines": 51,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "CsvTransform",
    "CsvTransformTests"
   ]
  },
  {
   "id": "data/dedup_events",
   "domain": "data",
   "title": "Deduplication of an event stream with distinct()",
   "summary": "Deduplication of an event stream with distinct(). Events arrive with duplicate IDs; we collapse to unique rows, count unique users, and show distinct(field) for value-level dedup. Classic \"exactly-once\" cleanup.",
   "url": "https://soma-lang.dev/corpus/data/dedup_events.cell",
   "repo_path": "examples/corpus/data/dedup_events.cell",
   "lines": 52,
   "features": [
    "pipeline"
   ],
   "cells": [
    "DedupEvents",
    "DedupEventsTests"
   ]
  },
  {
   "id": "data/expense_tracker",
   "domain": "data",
   "title": "Expense report over a List<Map> of line items",
   "summary": "Expense report over a List<Map> of line items. A normalize step tags each row as fixed vs variable, then aggregates spend per category and per type. Demonstrates a block-lambda classifier, agg, sum_by, and max_by together.",
   "url": "https://soma-lang.dev/corpus/data/expense_tracker.cell",
   "repo_path": "examples/corpus/data/expense_tracker.cell",
   "lines": 62,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "ExpenseReport",
    "ExpenseReportTests"
   ]
  },
  {
   "id": "data/funnel",
   "domain": "data",
   "title": "Conversion funnel: count distinct users reaching each stage, then compute step-to-step conversion rates",
   "summary": "Conversion funnel: count distinct users reaching each stage, then compute step-to-step conversion rates. Demonstrates count over a lambda, distinct per stage, and building a derived report list with map().",
   "url": "https://soma-lang.dev/corpus/data/funnel.cell",
   "repo_path": "examples/corpus/data/funnel.cell",
   "lines": 59,
   "features": [
    "pipeline"
   ],
   "cells": [
    "Funnel",
    "FunnelTests"
   ]
  },
  {
   "id": "data/group_reduce",
   "domain": "data",
   "title": "group_by returns a Map<String, List>; iterate its entries to compute a custom reduction the built-in agg doesn't cover (here: weighted average)",
   "summary": "group_by returns a Map<String, List>; iterate its entries to compute a custom reduction the built-in agg doesn't cover (here: weighted average). Demonstrates group_by + manual fold with reduce over each bucket.",
   "url": "https://soma-lang.dev/corpus/data/group_reduce.cell",
   "repo_path": "examples/corpus/data/group_reduce.cell",
   "lines": 58,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "GroupReduce",
    "GroupReduceTests"
   ]
  },
  {
   "id": "data/inner_join_orders",
   "domain": "data",
   "title": "Relational inner_join: enrich order rows with customer details, then roll up spend per customer tier",
   "summary": "Relational inner_join: enrich order rows with customer details, then roll up spend per customer tier. Demonstrates inner_join on a shared key, select to project columns, and agg over the joined result.",
   "url": "https://soma-lang.dev/corpus/data/inner_join_orders.cell",
   "repo_path": "examples/corpus/data/inner_join_orders.cell",
   "lines": 57,
   "features": [
    "pipeline",
    "match"
   ],
   "cells": [
    "OrderJoin",
    "OrderJoinTests"
   ]
  },
  {
   "id": "data/leaderboard",
   "domain": "data",
   "title": "Game leaderboard: rank players by score, award medals, compute gaps",
   "summary": "Game leaderboard: rank players by score, award medals, compute gaps. Demonstrates sort_by(\"score\",\"desc\") -> top, pluck, max_by/min_by, and per-row derived fields via map(... with ...). Records built with map().",
   "url": "https://soma-lang.dev/corpus/data/leaderboard.cell",
   "repo_path": "examples/corpus/data/leaderboard.cell",
   "lines": 60,
   "features": [
    "pipeline"
   ],
   "cells": [
    "Leaderboard",
    "LeaderboardTests"
   ]
  },
  {
   "id": "data/left_join_inventory",
   "domain": "data",
   "title": "left_join keeps every left row even when the right side has no match",
   "summary": "left_join keeps every left row even when the right side has no match. Products joined to a sparse stock table; unmatched products keep their fields but gain no stock columns. Demonstrates the ?? guard for missing data.",
   "url": "https://soma-lang.dev/corpus/data/left_join_inventory.cell",
   "repo_path": "examples/corpus/data/left_join_inventory.cell",
   "lines": 54,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Inventory",
    "InventoryTests"
   ]
  },
  {
   "id": "data/log_analysis",
   "domain": "data",
   "title": "Web access log analysis over List<Map> entries",
   "summary": "Web access log analysis over List<Map> entries. Demonstrates filter_by on status ranges, count_by, group_by, agg of latency, distinct paths, and top offenders. Classic log-crunching shape.",
   "url": "https://soma-lang.dev/corpus/data/log_analysis.cell",
   "repo_path": "examples/corpus/data/log_analysis.cell",
   "lines": 59,
   "features": [
    "pipeline"
   ],
   "cells": [
    "LogAnalysis",
    "LogAnalysisTests"
   ]
  },
  {
   "id": "data/record_pipeline",
   "domain": "data",
   "title": "Pipeline over typed Record literals (Name { field: v }) instead of map()",
   "summary": "Pipeline over typed Record literals (Name { field: v }) instead of map(). Records carry a _type tag and support dot-mutation. Demonstrates that the data builtins (filter_by, sort_by, agg, pluck) work on records too.",
   "url": "https://soma-lang.dev/corpus/data/record_pipeline.cell",
   "repo_path": "examples/corpus/data/record_pipeline.cell",
   "lines": 46,
   "features": [
    "pipeline"
   ],
   "cells": [
    "RecordPipeline",
    "RecordPipelineTests"
   ]
  },
  {
   "id": "data/sales_report",
   "domain": "data",
   "title": "Sales report: a List<Map> of orders rolled up by region and category",
   "summary": "Sales report: a List<Map> of orders rolled up by region and category. Demonstrates filter_by -> agg (group + sum/avg) -> sort_by, plus sum_by and pluck for headline numbers. Self-verifying via a test cell.",
   "url": "https://soma-lang.dev/corpus/data/sales_report.cell",
   "repo_path": "examples/corpus/data/sales_report.cell",
   "lines": 54,
   "features": [
    "pipeline"
   ],
   "cells": [
    "SalesReport",
    "SalesReportTests"
   ]
  },
  {
   "id": "data/stream_ingest",
   "domain": "data",
   "title": "Streaming ingest pipeline: push records into an ephemeral buffer slot, then aggregate the buffer in the same handler",
   "summary": "Streaming ingest pipeline: push records into an ephemeral buffer slot, then aggregate the buffer in the same handler. Demonstrates a List slot, slot.push, reading the buffer back with slot.all, and piping it through agg + sort_by.",
   "url": "https://soma-lang.dev/corpus/data/stream_ingest.cell",
   "repo_path": "examples/corpus/data/stream_ingest.cell",
   "lines": 55,
   "features": [
    "pipeline"
   ],
   "cells": [
    "StreamIngest",
    "StreamIngestTests"
   ]
  },
  {
   "id": "data/survey_scores",
   "domain": "data",
   "title": "Survey scoring: normalize raw responses, roll up per question, and flag low-confidence questions",
   "summary": "Survey scoring: normalize raw responses, roll up per question, and flag low-confidence questions. Demonstrates avg_by, agg with min/max, a derived spread column, and assert_fails on an out-of-bounds index (negative path).",
   "url": "https://soma-lang.dev/corpus/data/survey_scores.cell",
   "repo_path": "examples/corpus/data/survey_scores.cell",
   "lines": 50,
   "features": [
    "pipeline",
    "lambda"
   ],
   "cells": [
    "Survey",
    "SurveyTests"
   ]
  },
  {
   "id": "data/topn_movies",
   "domain": "data",
   "title": "Top-N and bottom-N reporting over a movie ratings table",
   "summary": "Top-N and bottom-N reporting over a movie ratings table. Demonstrates top/bottom after sort_by, select for projection, avg_by for a summary stat, and filter_by chaining to build a \"critically acclaimed\" list.",
   "url": "https://soma-lang.dev/corpus/data/topn_movies.cell",
   "repo_path": "examples/corpus/data/topn_movies.cell",
   "lines": 59,
   "features": [
    "pipeline"
   ],
   "cells": [
    "MovieCharts",
    "MovieChartsTests"
   ]
  }
 ]
}