<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Eli Bendersky's website - Lean</title><link href="https://eli.thegreenplace.net/" rel="alternate"/><link href="https://eli.thegreenplace.net/feeds/lean.atom.xml" rel="self"/><id>https://eli.thegreenplace.net/</id><updated>2026-11-11T03:26:16.381058-08:00</updated><entry><title>Monads in Lean</title><link href="https://eli.thegreenplace.net/2026/monads-in-lean/" rel="alternate"/><published>2026-11-10T19:25:00-08:00</published><updated>2026-11-11T03:26:16.381058-08:00</updated><author><name>Eli Bendersky</name></author><id>tag:eli.thegreenplace.net,2026-11-10:/2026/monads-in-lean/</id><summary type="html">&lt;p&gt;This post demonstrates how to use monads in the Lean programming language
(Lean 4, to be specific). If you're not familiar with Lean, this part of the
language is very similar to other functional programming languages, like
Haskell or OCaml.&lt;/p&gt;
&lt;div class="section" id="motivating-example-evaluating-expressions"&gt;
&lt;h2&gt;Motivating example - evaluating expressions&lt;/h2&gt;
&lt;p&gt;Suppose we want to write a …&lt;/p&gt;&lt;/div&gt;</summary><category term="misc"/><category term="Lean"/><category term="Functional programming"/></entry></feed>