Skip to content

Instantly share code, notes, and snippets.

View alpacaaa's full-sized avatar
🎱
Testing in production

Marco Sampellegrini alpacaaa

🎱
Testing in production
View GitHub Profile

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x

The Why and When of Choosing Elm

What is Elm?

  • Language (and "framework") for building web frontend applications
  • Can be used in place of HTML, CSS and JavaScript
  • Compiles into the above

The Easy-Peasy-Lemon-Squeezy, Statically-Typed, Purely Functional Programming Workshop for All!

John A. De Goes — @jdegoes


Agenda

  • Functions
  • Types, Kinds, & More Functions
  • FP Toolbox
<?xml version="1.0" encoding="utf-8" ?>
<data>
<params>
<root>http://www.example.com</root>
<view />
</params>
<projectpreviews>
<section id="1" handle="projects">Projects</section>
<entry id="2">
<project-name handle="sample-project-2">Sample Project 2</project-name>
<data>
<upcoming-events>
<section id="15" handle="upcoming-events">Upcoming events</section>
<entry id="1037">
<title handle="brockwell-park-firework-display-saturday-5th-november">BROCKWELL PARK FIREWORK DISPLAY - Saturday 5th November</title>
<date time="18:12" weekday="6">2011-11-05</date>
<time handle="700-745pm">7.00-7.45pm</time>
<location handle="outside-brockwell-hall-brockwell-park">Outside Brockwell Hall, Brockwell Park</location>
<content>Due to our MASSIVE successes at the Lambeth Country Show and the car-free days, Lambeth Events team have asked us to sing before the Firework Display in Brockwell Park. Wrap up warm in your Popchoir Sweatshirt and come along with your family and friends to enjoy the funfair and the fireworks as well as our own performance! And yes - they've learned their lesson - there WILL be a PA system this time!!!</content>
<choirs>
<student_list>
<student>
<name>George Washington</name>
<major>Politics</major>
<phone>312-123-4567</phone>
<email>[email protected]</email>
</student>
<student>
<name>adabadaje Jones</name>
<major>Undeclared</major>