Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
350
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
9
6.4k
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
750
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
300
世界最速級 memcached 互換サーバー作った
yasukata
0
340
モダンデータスタック (MDS) の話とデータ分析が起こすビジネス変革
sutotakeshi
0
490
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
360
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
280
re:Invent 2025 ~何をする者であり、どこへいくのか~
tetutetu214
0
210
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
6
1.5k
20251209_WAKECareer_生成AIを活用した設計・開発プロセス
syobochim
7
1.5k
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
450
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6k
How GitHub (no longer) Works
holman
316
140k
How to Ace a Technical Interview
jacobian
280
24k
Navigating Team Friction
lara
191
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
RailsConf 2023
tenderlove
30
1.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Scaling GitHub
holman
464
140k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
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();