lean-ja / lean-ja/lean-by-example
try catch 構文の使用例
Open
Nobody has claimed this yet.
コード例
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
/- # try catch 使用例 -/
def main : IO Unit := do
try
throw <| IO.userError "error"
catch e =>
IO.println s!"catch error: {e}"
IO.println "続き"
#eval main
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the try/catch example in the issue body as the entry point, and locate the appropriate Lean example page in the repository. Add the example where related language examples are documented, then verify that the rendered documentation includes the code and its expected output.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100