Lean 4 (Meta)programming Cookbook

I/O and Processes🔗

Contributors: Anirudh Gupta

This chapter covers various topics related to I/O and processes, threads and concurrency in Lean. Lean has great support for running tasks concurrently and provides a powerful API for handling I/O operations. We use the IO monad to perform our operations.

  1. Handling Stdin/Stdout/Stderr Streams
  2. Parsing Command Line Arguments
  3. Environment Variables
  4. Time Measurement of Process
  5. Tasks and Concurrency
  6. Miscellaneous IO