This is a free book on using Lean 4 as a programming language written by David Thrane Christiansen. The book is now complete and includes an introduction to the key ideas of dependent type theory. The book features code samples tested with Lean 4 release nightly-2023-05-22. Each release adds new chapters starting in June 2022, completing with all chapters by May 2023. The author is Executive Director of the Haskell Foundation, and his bio boasts about his contributions to the first version of the Idris language. The book is licensed under a Creative Commons Attribution 4.0 International License.
https://leanprover.github.io/functional_programming_in_lean/