Funarch examples

Learn Plinth and Plutarch side by side with the paper's introductory program, complete Cardano validators, and paired compiler-error examples. Every link opens editable source in the browser.

Start with the paper example

A small, complete program that makes the surface-language differences easy to see before moving into ledger APIs.

Recursive withdrawals

Guided example

The paper's compact introductory example: algebraic data, pattern matching, recursion, and integer arithmetic side by side.

Validator case studies

Production-shaped contracts covering the major Cardano script purposes and common ledger operations.

SundaeSwap NFT / Settings

Case study

Settings authorization NFT and multisig validator

Learn from compiler diagnostics

These projects are intentionally broken. Compile both versions and compare how each language explains the same class of mistake.

Missing equality constraint

Intentional error

Compare a missing Eq constraint in Plinth with the corresponding PEq constraint in Plutarch.

Missing on-chain data constraint

Intentional error

See how generic on-chain data requires ToData/UnsafeFromData in Plinth and PIsData in Plutarch.

Function application and parentheses

Intentional error

Contrast ordinary Haskell application with Plutarch's # operator when parentheses are missing.

Broken recursion

Intentional error

Compare accidental name shadowing in direct Plinth recursion with an incorrectly constructed Plutarch recursive term.