mpl/examples/03_file_processing.mpl
developtheweb acb98ae145 Fix examples so all ten parse
- 03: handler clause uses the canonical arrow (↯e ⟹ …, was ↯e ⇒ …)
- 05: give sin/cos a real placeholder body (⊥) — a comment-only body is
  empty and cannot parse
- Run parseExamples on the test runtime classpath; ParseExamples lives in
  the test source set and was never found on main.runtimeClasspath

./gradlew parseExamples now reports 10/10 PASS
2026-07-09 02:54:10 -04:00

7 lines
No EOL
229 B
Text

-- File processing with error handling
processFile ≜ λpath: {
data ← readFile(🖫path);
result ← transform(data);
writeFile(result, 🖫"output.txt");
⟨"success"|"failed"⟩
} ↴ {↯e ⟹ ⟨⊥|e⟩};