<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Elm on August Feng</title>
    <link>https://blog.augustfeng.app/tags/elm/</link>
    <description>Recent content in Elm on August Feng</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Feb 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.augustfeng.app/tags/elm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Elm type variables</title>
      <link>https://blog.augustfeng.app/articles/elm-type-variables/</link>
      <pubDate>Sun, 04 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://blog.augustfeng.app/articles/elm-type-variables/</guid>
      <description>&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;&#xA;&lt;h2 id=&#34;headline-1&#34;&gt;&#xA;About&#xA;&lt;/h2&gt;&#xA;&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;&#xA;&lt;p&gt;&#xA;In the Elm In Action book, Richard Feldman writes:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A command that produces no messages has the type Cmd msg, a sub- scription (for&#xA;example, Sub.none) that produces no messages has the type Sub msg, and a list&#xA;that has no elements—that is, []—has the similar type List val.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&#xA;The lower casing of &lt;code&gt;msg&lt;/code&gt; signifies a &lt;em&gt;type variable&lt;/em&gt;. Type variables are Elm&amp;#39;s&#xA;implementation of generics.&lt;/p&gt;&#xA;&lt;p&gt;&#xA;The idea of a value being possible for a non concrete type felt odd to me, so&#xA;I&amp;#39;ve opt to explore this concept in other languages where I&amp;#39;m more familiar&#xA;with.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
