<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Basic syntax of Haskell on OOFP 2025-26</title>
    <link>https://unibz-oofp-25-26.github.io/docs/haskell/</link>
    <description>Recent content in Basic syntax of Haskell on OOFP 2025-26</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://unibz-oofp-25-26.github.io/docs/haskell/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Tokens</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/tokens/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/tokens/</guid>
      <description>&lt;h1 id=&#34;tokens&#34;&gt;&#xA;  Tokens&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#tokens&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Syntax.&lt;/em&gt;&lt;/strong&gt; Here are syntactic constraints on basic elements of a Haskell program:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;meaning&lt;/th&gt;&#xA;          &lt;th&gt;syntax&lt;/th&gt;&#xA;          &lt;th&gt;examples&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;variable name&lt;/td&gt;&#xA;          &lt;td&gt;starts with a lower case letter&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x&lt;/code&gt;, &lt;code&gt;xs&lt;/code&gt;, &lt;code&gt;f&lt;/code&gt;, &lt;code&gt;remainder&lt;/code&gt;, &lt;code&gt;maxValue&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;function name&lt;/td&gt;&#xA;          &lt;td&gt;starts with a lower case letter&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;square&lt;/code&gt;, &lt;code&gt;applyBoolOp&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;type&lt;/td&gt;&#xA;          &lt;td&gt;starts with an upper case letter&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;Integer&lt;/code&gt;, &lt;code&gt;Char&lt;/code&gt;, &lt;code&gt;Bool&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;type variable&lt;/td&gt;&#xA;          &lt;td&gt;starts with a lower case letter&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;baseType&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;constructor&lt;/td&gt;&#xA;          &lt;td&gt;starts with a capital letter&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;Cons&lt;/code&gt;, &lt;code&gt;CityC&lt;/code&gt;, &lt;code&gt;True&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Base types</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/type/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/type/</guid>
      <description>&lt;h1 id=&#34;base-types&#34;&gt;&#xA;  Base types&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#base-types&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;A &lt;strong&gt;base type&lt;/strong&gt; in Haskell intuitively represents a set of values (like in Java, and many other languages).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Here are a few native base types:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;type&lt;/th&gt;&#xA;          &lt;th&gt;meaning&lt;/th&gt;&#xA;          &lt;th&gt;syntax of constants in Haskell&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;Char&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a Unicode character, like &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;B&lt;/code&gt;, &lt;code&gt;5&lt;/code&gt;, &lt;code&gt;_&lt;/code&gt; or &lt;code&gt;\t&lt;/code&gt;.&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;&#39;b&#39;&lt;/code&gt;, &lt;code&gt;&#39;B&#39;&lt;/code&gt;, &lt;code&gt;&#39;5&#39;&lt;/code&gt;, &lt;code&gt;&#39;_&#39;&lt;/code&gt; or &lt;code&gt;&#39;\t&#39;&lt;/code&gt; (single quotes)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a sequence of Unicode characters, like &lt;code&gt;banana&lt;/code&gt; or &lt;code&gt;f?#\t5&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;&amp;quot;banana&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;f?#\t5&amp;quot;&lt;/code&gt; (double quotes)&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;Bool&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a Boolean value&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;Integer&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;an arbitrary integer (i.e. an element of $\mathbb{Z}$)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;-42&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;Int&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;an integer within a certain range, from $- 2^{63}$ to $2^{63} -1$ (i.e. 64 bits) by default.&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;-42&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;Float&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a 32 bits floating-point number&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;-42&lt;/code&gt;, &lt;code&gt;4472&lt;/code&gt;, &lt;code&gt;4472.0&lt;/code&gt; or &lt;code&gt;4472.1357&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;</description>
    </item>
    <item>
      <title>Native functions</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/native/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/native/</guid>
      <description>&lt;h1 id=&#34;native-functions&#34;&gt;&#xA;  Native functions&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#native-functions&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Syntax.&lt;/em&gt;&lt;/strong&gt; Many native functions/operators (e.g. over numbers or Boolean values) have the same syntax in Haskell and Java.&#xA;This includes equality (&lt;code&gt;==&lt;/code&gt;), sum (&lt;code&gt;+&lt;/code&gt;), product (&lt;code&gt;*&lt;/code&gt;), etc.&lt;/p&gt;&#xA;&lt;p&gt;We highlight below a few cases where the two syntaxes differ:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;meaning&lt;/th&gt;&#xA;          &lt;th&gt;syntax in Haskell&lt;/th&gt;&#xA;          &lt;th&gt;example&lt;/th&gt;&#xA;          &lt;th&gt;syntax in Java&lt;/th&gt;&#xA;          &lt;th&gt;example&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;inequality&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;/=&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x /= 2&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;!=&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x != 2&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;negation (NOT)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;not&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;not x&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;!&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;!x&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;disjunction (OR)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;||&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x || y&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;||&lt;/code&gt; (lazy evaluation) or &lt;br&gt; &lt;code&gt;|&lt;/code&gt; (full evaluation)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x || y&lt;/code&gt; or &lt;br&gt; &lt;code&gt;x | y&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;conjunction (AND)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x &amp;amp;&amp;amp; y&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; (lazy evaluation) or &lt;br&gt;&lt;code&gt;&amp;amp;&lt;/code&gt; (full evaluation)&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;x &amp;amp;&amp;amp; y&lt;/code&gt; or &lt;br&gt; &lt;code&gt;x &amp;amp; y&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Tuple</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/tuple/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/tuple/</guid>
      <description>&lt;h1 id=&#34;tuple&#34;&gt;&#xA;  Tuple&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#tuple&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;Syntax.&lt;/strong&gt;&#xA;A &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/background/sections/set_list/#tuple&#34;&gt;tuple&lt;/a&gt; in Haskell is written in parentheses.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example.&lt;/em&gt;&lt;/strong&gt;&#xA;The &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/background/sections/set_list/#tuple&#34;&gt;pair&lt;/a&gt;&#xA;$(\mathit{banana}, 5)$ is written&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-haskell&#34; data-lang=&#34;haskell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;banana&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;Syntax.&lt;/strong&gt; The &lt;em&gt;type&lt;/em&gt; of a tuple is written in parentheses (like the tuple itself).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Examples.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Haskell tuple&lt;/th&gt;&#xA;          &lt;th&gt;Possible type&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;(5,3)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;(Int, Int)&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;(&amp;quot;banana&amp;quot;, 5)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;(String, Int)&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;code&gt;(&amp;quot;banana&amp;quot;, 5, &amp;quot;tomato&amp;quot;)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;(String, Int, String)&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Function</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/function/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/function/</guid>
      <description>&lt;h1 id=&#34;function&#34;&gt;&#xA;  Function&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#function&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;definition&#34;&gt;&#xA;  Function definition&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#definition&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Syntax.&lt;/em&gt;&lt;/strong&gt;&#xA;A function in Haskell is defined analogously to a &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/background/sections/function/&#34;&gt;mathematical function&lt;/a&gt;, with the symbol &lt;code&gt;=&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example.&lt;/em&gt;&lt;/strong&gt;&#xA;The function $f(x) = 2x$ is written:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-haskell&#34; data-lang=&#34;haskell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt; x &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; x&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint danger&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Warning.&lt;/em&gt;&lt;/strong&gt;&#xA;As opposed to Java (and C/C++, C#, Javascript, Python, etc.), the symbol &lt;code&gt;=&lt;/code&gt; in Haskell does &lt;em&gt;not&lt;/em&gt; assign a value to a variable.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;Syntax.&lt;/strong&gt;&#xA;Note that $f(x)$ is written &lt;code&gt;f x&lt;/code&gt;, without parentheses.&#xA;This also holds when applying a function to a constant.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Program</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/program/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/program/</guid>
      <description>&lt;h1 id=&#34;program&#34;&gt;&#xA;  Program&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#program&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;file&#34;&gt;&#xA;  File&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#file&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;A simple Haskell program is written in a file with the extension &lt;code&gt;.hs&lt;/code&gt;.&#xA;For instance, &lt;code&gt;MyProgram.hs&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;content&#34;&gt;&#xA;  Content&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#content&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;functions&#34;&gt;&#xA;  Functions&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#functions&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;A Haskell program primarily consists of &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/haskell/sections/function/#definition&#34;&gt;function definitions&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Hint.&lt;/em&gt;&lt;/strong&gt;&#xA;The order of function definitions in a program is irrelevant.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h4 id=&#34;main&#34;&gt;&#xA;  The function &lt;code&gt;main&lt;/code&gt;&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#main&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;p&gt;To make a program executable, one of its functions must be the entry point.&#xA;By default, this function is called &lt;code&gt;main&lt;/code&gt;, and has type &lt;code&gt;IO ()&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>List</title>
      <link>https://unibz-oofp-25-26.github.io/docs/haskell/sections/list/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/haskell/sections/list/</guid>
      <description>&lt;h1 id=&#34;list&#34;&gt;&#xA;  List&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#list&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;recursive-form&#34;&gt;&#xA;  Recursive form&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#recursive-form&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Lists in Haskell are recursive.&lt;/p&gt;&#xA;&lt;blockquote class=&#34;book-hint warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Definition (finite list in Haskell).&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;[]&lt;/code&gt; is the empty list,&lt;/li&gt;&#xA;&lt;li&gt;if &lt;code&gt;x&lt;/code&gt; is an element and &lt;code&gt;xs&lt;/code&gt; a list, then &lt;code&gt;x : xs&lt;/code&gt; is a list.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In addition, all elements in a list must have the same type.&#xA;If this type is &lt;code&gt;a&lt;/code&gt;, then the list has type &lt;code&gt;[a]&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote class=&#34;book-hint info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Example.&lt;/em&gt;&lt;/strong&gt;&#xA;The Haskell list&lt;/p&gt;&#xA;&lt;p&gt;$\qquad$&lt;code&gt;5 : (2 : [])&lt;/code&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
