<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Functional on Ocarina — manual</title>
    <link>https://mojo-molotov.github.io/from-ocarina-to-igor/tags/functional/</link>
    <description>Recent content in Functional on Ocarina — manual</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Thu, 28 May 2026 21:02:53 +0200</lastBuildDate>
    <atom:link href="https://mojo-molotov.github.io/from-ocarina-to-igor/tags/functional/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Chapter 03 — Functional programming with Ocarina</title>
      <link>https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/</link>
      <pubDate>Wed, 20 May 2026 00:00:00 +0000</pubDate>
      <guid>https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/</guid>
      <description>&lt;h1 id=&#34;chapter-03functional-programming-with-ocarina&#34;&gt;Chapter 03 — Functional programming with Ocarina&lt;a class=&#34;anchor&#34; href=&#34;#chapter-03functional-programming-with-ocarina&#34; data-pagefind-ignore=&#34;all&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;blockquote class=&#39;book-hint &#39;&gt;&#xA;&lt;p&gt;How Ocarina &lt;strong&gt;applies&lt;/strong&gt; functional programming and &lt;strong&gt;why&lt;/strong&gt;. This chapter is more &lt;em&gt;transversal&lt;/em&gt; than the others — it revisits the framework&amp;rsquo;s mechanics from an FP angle.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;h2 id=&#34;outline&#34;&gt;Outline&lt;a class=&#34;anchor&#34; href=&#34;#outline&#34; data-pagefind-ignore=&#34;all&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: center&#34;&gt;#&lt;/th&gt;&#xA;          &lt;th&gt;File&lt;/th&gt;&#xA;          &lt;th&gt;Topic&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;01&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/01-effect-thunk-result/&#34;&gt;&lt;code&gt;01-effect-thunk-result.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;Effect&lt;/code&gt;, &lt;code&gt;Thunk[T]&lt;/code&gt;, &lt;code&gt;Result[T]&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;02&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/02-closures-ioc/&#34;&gt;&lt;code&gt;02-closures-ioc.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Closures as the primitive of inversion of control.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;03&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/03-lazy-evaluation/&#34;&gt;&lt;code&gt;03-lazy-evaluation.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Laziness everywhere: ChainRunner, validate.execute, Watcher callback, lazy prefixes.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;04&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/04-fold-reduce/&#34;&gt;&lt;code&gt;04-fold-reduce.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;reduce&lt;/code&gt; (fold left) in &lt;code&gt;chain_actions&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;05&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/05-declarative/&#34;&gt;&lt;code&gt;05-declarative.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Declarative programming: a scenario &lt;em&gt;describes&lt;/em&gt;, doesn&amp;rsquo;t execute.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;06&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/06-pep-695-generics/&#34;&gt;&lt;code&gt;06-pep-695-generics.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;PEP 695 generics, &lt;code&gt;TypeVar bound&lt;/code&gt;, &lt;code&gt;type X[T] = ...&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;07&lt;/td&gt;&#xA;          &lt;td&gt;&lt;a href=&#34;https://mojo-molotov.github.io/from-ocarina-to-igor/03-functional/07-discriminated-unions-typeguards/&#34;&gt;&lt;code&gt;07-discriminated-unions-typeguards.md&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Discriminated unions + &lt;code&gt;TypeGuard&lt;/code&gt; + &lt;code&gt;@final&lt;/code&gt; = &amp;ldquo;&lt;em&gt;sealed&lt;/em&gt;&amp;rdquo; unions.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;why-a-dedicated-chapter&#34;&gt;Why a dedicated chapter&lt;a class=&#34;anchor&#34; href=&#34;#why-a-dedicated-chapter&#34; data-pagefind-ignore=&#34;all&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Ocarina&amp;rsquo;s code is small but &lt;strong&gt;embodies&lt;/strong&gt; a serious number of FP patterns. This chapter names them, justifies them, and points to where they live in the code.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
