Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functional Brighton Meet up: what functional pr...
Search
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
46
Voice to guide "difficult" recycling queries
d6y
0
60
Brighton Java: Day in the life...
d6y
0
230
Day in the Life of a Functional Programmer
d6y
0
630
Exoplanet Safari
d6y
1
450
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
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
4
810
シンプルを極める。アンチパターンなDB設計の本質
facilo_inc
2
1.7k
Multimodal AI Driving Solutions to Societal Challenges
keio_smilab
PRO
1
140
著者と読み解くAIエージェント現場導入の勘所 Lancers TechBook#2
smiyawaki0820
12
5.6k
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
250
直接メモリアクセス
koba789
0
270
re:Invent 2025 ふりかえり 生成AI版
takaakikakei
1
140
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
3
730
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
140
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
1
130
Overture Maps Foundationの3年を振り返る
moritoru
0
140
エンジニアとPMのドメイン知識の溝をなくす、 AIネイティブな開発プロセス
applism118
2
280
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
It's Worth the Effort
3n
187
29k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating Team Friction
lara
191
16k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
What's in a price? How to price your products and services
michaelherold
246
12k
Automating Front-end Workflow
addyosmani
1371
200k
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();