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
Richard Dallaway
September 27, 2011
Technology
580
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Richard Dallaway
See All by Richard Dallaway
AI Roadmap
d6y
0
65
Voice to guide "difficult" recycling queries
d6y
0
83
Brighton Java: Day in the life...
d6y
0
250
Day in the Life of a Functional Programmer
d6y
0
660
Exoplanet Safari
d6y
1
490
Types Working For You
d6y
1
2.8k
Towards Browser and Server Utopia with Scala.js: an example using CRDTs
d6y
0
7.8k
Code Review Gems
d6y
1
2k
Woot for Lift
d6y
2
3.4k
Other Decks in Technology
See All in Technology
OCI Oracle AI Database Services新機能アップデート(2026/03-2026/05)
oracle4engineer
PRO
0
360
Microsoft Build Keynoteふりかえり
tomokusaba
0
120
「エンジニア進化論」2028年の開発完全自動化、エンジニアはどう進化するか
cyberagentdevelopers
PRO
4
4.3k
2026TECHFRESH畢業分享會 - AI 時代的人生存檔點
line_developers_tw
PRO
0
680
LLMにもCAP定理があるという話
harukasakihara
0
280
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
580
JSAI2026 オーガナイズドセッションOS-27「不動産とAI」趣旨説明 / JSAI2026 Organized Session OS-27 “Real Estate and AI”: Statement of Purpose
ykiyota
0
210
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
18
6.4k
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.9k
MCP Appsを作ってみよう
iwamot
PRO
4
470
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
1.2k
Disciplined Vibes: Scaling AI-Assisted Engineering
sheharyar
0
120
Featured
See All Featured
Scaling GitHub
holman
464
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
The untapped power of vector embeddings
frankvandijk
2
1.8k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
700
For a Future-Friendly Web
brad_frost
183
10k
We Are The Robots
honzajavorek
0
240
Deep Space Network (abreviated)
tonyrice
0
170
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();