<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://ocw.cs.pub.ro/ppcarte/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://ocw.cs.pub.ro/ppcarte/feed.php">
        <title>books pp:2024:scala</title>
        <description></description>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <image rdf:resource="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-05-15T18:54:33+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:ide&amp;rev=1708867192&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l01&amp;rev=1709140219&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l02&amp;rev=1741164452&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l03&amp;rev=1710350849&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l04&amp;rev=1711354069&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l05&amp;rev=1711892711&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l06&amp;rev=1712341112&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico">
        <title>books</title>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <url>https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:ide&amp;rev=1708867192&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-25T15:19:52+03:00</dc:date>
        <title>pp:2024:scala:ide</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:ide&amp;rev=1708867192&amp;do=diff</link>
        <description>Scala setup

Installation

Scala can be downloaded and installed on either a Windows or NIX platform (e.g. Linux, OS-X) here. For this lecture you must install Scala 3, and we recommend installing it using Coursier (see the previous link)

IDE

One of the most widely used IDE (Integrated Development Environment) for Scala is:</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l01&amp;rev=1709140219&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-28T19:10:19+03:00</dc:date>
        <title>pp:2024:scala:l01</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l01&amp;rev=1709140219&amp;do=diff</link>
        <description>Lab 1. Introduction to Scala

 Objectives: 

	*  get yourself familiar with Scala syntax basics
	*  practice writing tail-recursive functions as an alternative to imperative loops 
	*  keep your code clean and well-structured.

 Create a new Scala worksheet to write your solutions $ n$$ 1 + 2^2 + 3^2 + \ldots + (n-1)^2 + n^2$$ x$$ x_0, x_1, \ldots, x_n$$ (\ldots((x - x_0) - x_1) - \ldots x_n)$$ x$$ x_0, x_1, \ldots, x_n$$ x_0 - (x_1 - \ldots - (x_n - x)\ldots)$$ \sqrt{a}$$ x_0 = 1$$ x_{n+1} = \d…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l02&amp;rev=1741164452&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-03-05T10:47:32+03:00</dc:date>
        <title>pp:2024:scala:l02</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l02&amp;rev=1741164452&amp;do=diff</link>
        <description>Lab 2. High order functions

Objectives:

	*  implement and use higher-order functions. A higher-order function takes other functions as parameter or returns them
	*  implement curry and uncurry functions, and how they should be properly used (review lecture).$ a_1, a_2, \ldots, a_k$$ f(a_1)\;op\;f(a_2)\;op\;\ldots f(a_k)$$ f(x) = a*x + b$$ \Delta y$$ \Delta x$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l03&amp;rev=1710350849&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-13T19:27:29+03:00</dc:date>
        <title>pp:2024:scala:l03</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l03&amp;rev=1710350849&amp;do=diff</link>
        <description>Lab 3. Lists in Scala

Objectives:

	*  get familiar with pattern matching lists, as well as common list operations from Scala and how they work
	*  get familiar with common higher-order functions over lists (partition, map, foldRight, foldLeft, filter)</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l04&amp;rev=1711354069&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-25T10:07:49+03:00</dc:date>
        <title>pp:2024:scala:l04</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l04&amp;rev=1711354069&amp;do=diff</link>
        <description>Lab 4. Data types in Scala

Objectives:

	*  get familiar with algebraic data types
	*  get familiar with pattern matching and recursion with them

4.1 Natural Numbers

Given the following implementation of the natural numbers, solve the next few exercises.$  \displaystyle \left(\begin{array}{ccc} 1 &amp; 2 &amp; 3 \\ 4 &amp; 5 &amp; 6 \\ 7 &amp; 8 &amp; 9 \\ \end{array}\right)$$  \displaystyle 2 * \left(\begin{array}{ccc} 1 &amp; 2 &amp; 3 \\ 4 &amp; 5 &amp; 6 \\ 7 &amp; 8 &amp; 9 \\ \end{array}\right) = \left(\begin{array}{ccc} 2 &amp; 4 &amp; 6 \\…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l05&amp;rev=1711892711&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-31T16:45:11+03:00</dc:date>
        <title>pp:2024:scala:l05</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l05&amp;rev=1711892711&amp;do=diff</link>
        <description>Lab 5. Variance and implicits

5.1. Variance

We will use a couple of animal types represented as classes for the following exercises.


class Animal(name: String) {
    override def toString: String = name
}
case class Cat(name: String) extends Animal(name)
case class Dog(name: String) extends Animal(name)</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l06&amp;rev=1712341112&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-04-05T21:18:32+03:00</dc:date>
        <title>pp:2024:scala:l06</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=pp:2024:scala:l06&amp;rev=1712341112&amp;do=diff</link>
        <description>Lab 6. For expressions

6.1 A small string DSL

In this section we will extend the scala String class with several operators that implement useful string functions, effectively obtaining a small string-specialized DSL.

6.1.1 Implement the &lt;&lt; and &gt;&gt; operators for a</description>
    </item>
</rdf:RDF>
