Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
20250512 関数型DDD 10
Search
saka
December 24, 2025
7
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20250512 関数型DDD 10
saka
December 24, 2025
More Decks by saka
See All by saka
20250304 関数型DDD 6
sakatttttta
0
25
20241219 Github Actionsの面倒いところ
sakatttttta
0
18
20250109 関数型
sakatttttta
0
11
20250116 関数型DDD 2
sakatttttta
0
11
20250123 関数型DDD 3
sakatttttta
0
11
20250206 関数型DDD 4
sakatttttta
0
12
20250213 関数型DDD 4
sakatttttta
0
12
20250220 Hono カスタムfetch
sakatttttta
0
10
20250225 関数型DDD 5
sakatttttta
0
9
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Odyssey Design
rkendrick25
PRO
2
880
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
WCS-LA-2024
lcolladotor
0
890
Mind Mapping
helmedeiros
1
400
Building AI with AI
inesmontani
PRO
1
1.3k
Transcript
ؔܕDDD
Τϥʔ
ࠓ·ͰΤϥʔͳ͠ ߟ͍͑͢Α͏ʹ
Resultܕ
໌͍ࣔͨ͠
Τϥʔ
type CheckAddressExists = UnvalidatedAddress -> CheckedAddress
શҬؔʹ͍ͨ͠…
type CheckAddressExists = UnvalidatedAddress -> Result<CheckedAddress, AddressValidationError> and AddressValidationError =
| InvalidFormat of string | AddressNotFound of string
ΤϥʔΛྨ
υϝΠϯΤϥʔ ϏδωεϓϩηεͷҰ෦ͱ͠ ͯ༧͞ΕΔΤϥʔ ྫɿແޮͳίʔυ
ύχοΫ ॲཧෆՄೳͳγεςϜΤϥʔ ϓϩάϥϚͷݟམͱ͠ʹΑΔ Τϥʔ ྫɿϝϞϦෆ
ΠϯϑϥετϥΫ νϟΤϥʔ ωοτϫʔΫλΠϜΞτɺೝ ূࣦഊͳͲ
ҟͳΔ࣮͕ඞཁ
υϝΠϯΤϥʔ υϝΠϯϞσϦϯάʹΈࠐ ΈɺܕγεςϜʹจॻԽ
ύχοΫ ྫ֎Λൃੜͤ͞ɺ࠷্ҐͰิ
ΠϯϑϥετϥΫ νϟΤϥʔ ΞʔΩςΫνϟʹΑΔ େମυϝΠϯΤϥʔʹؚΊΔ ํཱ͕ͭ ↓ ͲΜͳΤϥʔ͕ى͜Δ͔ߟ͑Δ
Τϥʔͷܕ
type PlaceOrderError = | ValidationError of string | ProductOutOfStock of
ProductCode | RemoteServiceError of RemoteServiceError
બܕ
։ൃͷਐΊͳ͕ΒΤϥʔ έʔεΛՃ
Τϥʔॲཧ
ྫ֎ɿޭύεͷίʔυ ៉ྷ
try-catchͳͲͰࡶ
Resultʁ
ύΠϓϥΠϯ
ޭࣦഊͷ2ͭ
ͦΕΛઢ࿏Έ͍ͨʹܨ͛ Δ
2τϥοΫϞσϧ మಓࢤϓϩάϥϛϯά
ී௨ೖྗ͕Ұͭ
2ͭͷೖྗΛ࣋ͨͤΔ
Ξμϓλʔ