Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functional Brighton Meet up: what functional pr...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Richard Dallaway
September 27, 2011
Technology
2
550
Functional Brighton Meet up: what functional programming means to me.
See:
http://richard.dallaway.com/functional-brighton-presentations-on-what-fun
Richard Dallaway
September 27, 2011
Tweet
Share
More Decks by Richard Dallaway
See All by Richard Dallaway
AI Roadmap
d6y
0
49
Voice to guide "difficult" recycling queries
d6y
0
64
Brighton Java: Day in the life...
d6y
0
240
Day in the Life of a Functional Programmer
d6y
0
640
Exoplanet Safari
d6y
1
460
Types Working For You
d6y
1
2.7k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.7k
Code Review Gems
d6y
1
2k
Woot for Lift
d6y
2
3.3k
Other Decks in Technology
See All in Technology
What happened to RubyGems and what can we learn?
mikemcquaid
0
280
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.2k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
130
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.4k
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
350
Cosmos World Foundation Model Platform for Physical AI
takmin
0
830
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
210
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The SEO Collaboration Effect
kristinabergwall1
0
350
Exploring anti-patterns in Rails
aemeredith
2
250
Scaling GitHub
holman
464
140k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Test your architecture with Archunit
thirion
1
2.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Transcript
Three things I’ve noticed about functional programming while using Scala.
happy birthday to me happy birthday to me #lol #omg
oops #lol oops #lol #omg 㱺 㱺 ⋮ ⋮ What have we have? What do we want?
#lol, #omg & some text Some text 㱺 What have
we have? What do we want?
#lol, #omg & some text Some text 㱺 What have
we have? What do we want? List[String], String 㱺 String
def appendTags(tweet: String, tags: List[String]) = tags.foldLeft(tweet) { appendOne }
def appendOne(tweet: String, tag: String) = if (tweet contains tag) tweet else tweet+" "+tag
“It’s the mutable state, stupid.” – Göetz et al.
val results = List(yahoo _, google _).par.map(_.apply)
import scala.actors.Futures._ val results = List(yahoo _, google _) map
( f 㱺 future{ f() } ) map (_.apply)
Option, for comprehensions, flatMap & pattern matching are astonishingly useful
every day and I’d never heard of them before learning Scala.
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
ContactEntry entry = resultFeed.getEntries().get(i); if (entry.hasName()) { Name name = entry.getName(); if (name.hasFullName()) { ...
for { entry ← resultFeed.getEntries name ← Option(entry.getName) full_name ←
Option(name.getFullName) birthday ← Option(entry.getBirthday) } yield "%s: %s".format(full_name.getValue, when)
1. Thinking in terms of A 㱺 B 2. Concurrency
3. Option (& friends) change everything Summary
StringBuffer b = new StringBuffer(tweet); if (tags != null) {
for(String tag: tags) { if (tag != null && b.indexOf(tag) == -1) { b.append(tag).append(“ ”); } } } return b.toString();