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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Richard Dallaway
September 27, 2011
Technology
590
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
71
Voice to guide "difficult" recycling queries
d6y
0
94
Brighton Java: Day in the life...
d6y
0
260
Day in the Life of a Functional Programmer
d6y
0
670
Exoplanet Safari
d6y
1
500
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
2.1k
Woot for Lift
d6y
2
3.4k
Other Decks in Technology
See All in Technology
AIに狂うスタートアップが、あえて「人との協働」に全振りした新卒エンジニア研修 / New Graduate Engineer Training at a Startup Accelerating AI Adoption
ohnoeight
0
160
AIに持続⼒を与える 判断の⻑期記憶設計
eiei114
1
430
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1.6k
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.4k
tamachi.go 誕生の裏側
rymiyamoto
1
190
AIにブラウザを触らせて、E2EテストをPlaywrightで書く
koji_kawamura
0
210
What's new in Go 1.27?
ciarana
0
280
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
180
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
3
420
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
4
26k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
24
430k
AI時代に、人は何を、どう学ぶのか #pbl_pub / What and How Do We Learn in the AI Era?
takaking22
1
180
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
390
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Embracing the Ebb and Flow
colly
88
5.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Odyssey Design
rkendrick25
PRO
2
770
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
440
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
380
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
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();