Women Who Code
Functional Programming
9/26/16
Welcome!!
Sponsor: Object Rocket for food and meeting space
Agenda:
● Intros
● Goals of the meetup
● Short talk about functional programming
● Installing Clojure or Haskell
● Practicing Code
Goals of this meetup
We will have short presentations on a functional programming language
Time to code and get help on learning
Intros
Name
Where you work
Experience doing Functional Programming, none is ok!
Types of Programming
Procedural
Object Orientated
Functional
Why would you use each of these?
(discussion)
Conveying Intent
Think about how to best convey intent
Easier to Test
Depending on what you are doing, one style of programming can be easier to test.
Sample in Haskell
Take an list of strings, upper-case each letter and return a new list..
map (map toUpper) [“red”, “blue”, “green”]
Returns:
[“RED”, “BLUE”, “GREEN”]
Sample in Clojure
Take an array of strings, upper-case each letter and return a collection.
(map
clojure.string/upper-case
["red" "blue" "green"])
Returns:
("RED" "BLUE" "GREEN")
Sample in Javascript
["red", "blue", "green"].map(function(x) {
return x.toUpperCase(); });
Returns:
[ 'RED', 'BLUE', 'GREEN' ]
Installing: Haskell (Ubuntu 16.04)
https://docs.haskellstack.org/en/stable/README/
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
575159689BEFB442
echo 'deb http://download.fpcomplete.com/ubuntu xenial main'|tee
/etc/apt/sources.list.d/fpco.list
apt-get update
apt-get install -y stack
Installing Haskell (OS X)
https://docs.haskellstack.org/en/stable/README/
Finding Documentation: Haskell
● University of Pennsylvania, CIS194, Spring 2013:
http://www.cis.upenn.edu/~cis194/spring13/
● Library Reference: https://hackage.haskell.org/
● Haskell Reference: https://www.haskell.org/onlinereport/haskell2010/
● Haskell.org: https://www.haskell.org/
●
Installing: Clojure
Ensure Java 1.8 is installed
Install Lein
Finding Documentation: Clojure
Clojure.org
Books:
● Clojure for the Brave and True - free to read online
● Living Clojure
Practicing Code
Exercism.io
Koans - Clojure
Runs on your computer,
use your own editor

Women Who Code Functional Programming - 9/26/2016