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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
67
Voice to guide "difficult" recycling queries
d6y
0
87
Brighton Java: Day in the life...
d6y
0
260
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
AWS Summit Japan 2026の振り返りと2027へ向けて / AWS Summit Japan 2026 Recap and Prospects for 2027
kaminashi
1
190
10x Speed With QA Agent Platform - How we scaled adoption from individual effort to organizational capability
lycorptech_jp
PRO
0
130
AI Agent SaaS を支える自社仮想化基盤への挑戦と実運用 / ai-agent-saas-virtualization
flatt_security
0
460
製造現場での生成AIの活用、およびエージェントAIの実装のあり方、AVEVAの取り組み
iotcomjpadmin
0
220
Claude Codeとハーネスについて考えてみる
oikon48
16
7.5k
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
1
720
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
130
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
180
Baseline対応のDOMの型定義を作った
uhyo
2
650
5分でわかるDuckDB Quack
chanyou0311
4
310
Text-to-SQLをAgentCoreで実現し、生成されるSQLの精度を定量的に評価する
yakumo
2
480
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
170
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
330
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
460
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
230
エンジニアに許された特別な時間の終わり
watany
107
250k
Between Models and Reality
mayunak
4
360
WENDY [Excerpt]
tessaabrams
11
38k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
620
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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();