<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Assignments on OOFP 2025-26</title>
    <link>https://unibz-oofp-25-26.github.io/docs/ass/</link>
    <description>Recent content in Assignments on OOFP 2025-26</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://unibz-oofp-25-26.github.io/docs/ass/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Assignment 1</title>
      <link>https://unibz-oofp-25-26.github.io/docs/ass/sections/ass1/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/ass/sections/ass1/</guid>
      <description>&lt;h1 id=&#34;assignment-1-higher-order-functions-and-linear-recursion&#34;&gt;&#xA;  Assignment 1: higher-order functions and linear recursion&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#assignment-1-higher-order-functions-and-linear-recursion&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&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;In this assignment,&#xA;you can often take advantage of the native &lt;a href=&#34;https://unibz-oofp-25-26.github.io/docs/higher/sections/useful_hofs/&#34;&gt;higher-order functions&lt;/a&gt; that we have encountered: &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;all&lt;/code&gt;, &lt;code&gt;any&lt;/code&gt;, etc.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;exercise-1-utility-functions&#34;&gt;&#xA;  Exercise 1: utility functions&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#exercise-1-utility-functions&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Implement the functions below by completing the function stubs in the file &lt;code&gt;Src/Utility.hs&lt;/code&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;Some of these functions can be used to implement others.&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;Hint.&lt;/em&gt;&lt;/strong&gt;&#xA;Feel free to create additional (auxiliary) functions to simplify your implementation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assignment 2</title>
      <link>https://unibz-oofp-25-26.github.io/docs/ass/sections/ass2/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://unibz-oofp-25-26.github.io/docs/ass/sections/ass2/</guid>
      <description>&lt;h1 id=&#34;assignment-2-functional-patterns&#34;&gt;&#xA;  Assignment 2: functional patterns&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#assignment-2-functional-patterns&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;exercise-1-utility-functions&#34;&gt;&#xA;  Exercise 1: utility functions&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#exercise-1-utility-functions&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Implement the functions below by completing the function stubs in the file &lt;code&gt;Src/Utility.hs&lt;/code&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;Some of these functions can be used to implement others.&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;Hint.&lt;/em&gt;&lt;/strong&gt;&#xA;Feel free to create additional (auxiliary) functions to simplify your implementation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;lastmatch&#34;&gt;&#xA;  &lt;code&gt;lastMatch&lt;/code&gt;&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#lastmatch&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;Implement the function&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;lastMatch&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;::&lt;/span&gt; (a &lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;Bool&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt; [a] &lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;Maybe&lt;/span&gt; a&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;such that &lt;code&gt;lastMatch f xs&lt;/code&gt; is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;Just x&lt;/code&gt; if &lt;code&gt;x&lt;/code&gt; is the last element of the list &lt;code&gt;xs&lt;/code&gt; for which &lt;code&gt;f x&lt;/code&gt; is &lt;code&gt;True&lt;/code&gt;, or&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Nothing&lt;/code&gt; if there is no such &lt;code&gt;x&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For instance,&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
