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
apply() 要らなくない?
Search
Motoi Washida
August 22, 2017
Programming
1.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
apply() 要らなくない?
2017年の夏のKotlin LT祭での発表資料です。
https://kotlin.connpass.com/event/61427/
Motoi Washida
August 22, 2017
More Decks by Motoi Washida
See All by Motoi Washida
CLIPでマルチモーダル画像検索 →とても良い
wm3
3
1.2k
アプリのための「レイヤー化」アーキテクチャ / Droid Meetup 2019-03
wm3
0
2.6k
Material Design の社内勉強会を行った / Android Engineer Design 1
wm3
1
220
API仕様書から自前でコード生成して運用した話 / DroidKaigi 2018 Reject Conference
wm3
0
940
Firebase Analytics で 画像ロードのパフォーマンス を測定し、改善をした話
wm3
2
1.5k
Tunnel 社内勉強会 Swift の紹介
wm3
0
340
iOS の Reactive 系ライブラリ
wm3
1
990
Other Decks in Programming
See All in Programming
mrbgem 三角測量 開発
ogom
0
180
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
260
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
520
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
14k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
150
カツオ、ご期待ください
suneo3476
0
140
Workers Cache を知る
syumai
0
320
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Automating Front-end Workflow
addyosmani
1369
210k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Ruling the World: When Life Gets Gamed
codingconduct
0
380
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
560
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
250
Making Projects Easy
brettharned
120
6.8k
Amusing Abliteration
ianozsvald
1
320
How to Talk to Developers About Accessibility
jct
2
560
Music & Morning Musume
bryan
48
7.4k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
350
Transcript
BQQMZ 銲זֻזְ 똲歊㛇
荈䊹稱➜
荈䊹稱➜ ˖ せ똲歊㛇 ˖ 5XJUUFS!XN ˖ "OESPJEؒٝآص، J04瘝װ ˖
3PPN$MJQהְֲ؎ٝذٔ،ⱖ溪ך $(.涪⚥
(PPHMF*0ך傈ח,PUMJO䱰欽׃ת׃
ַֿ ,PUMJO娖♲٠剢ך 蕯鰳罏ָזַ鎉ְתׅ
➙傈鎉ְְ✲
None
BQQMZ
銲זֻזְ
None
BQQMZ
أ؝٦فꟼ侧ך♧א ⴱ劍⻉ָٖؒؖٝز ח剅ֽ
BQQMZ ⢪זְה // { "key1": 1, "key2": 8 } //
ΛҾʹͯؔ͠Λݺͼ͍ͨ val map = Bundle() map.putInt("key1", 1) map.putInt("key2", 8) someFunction(map)
BQQMZ ⢪ֲה // { "key1": 1, "key2": 8 } //
ΛҾʹͯؔ͠Λݺͼ͍ͨ someMethod(Bundle().apply { putInt("key1", 1) putInt("key2", 8) })
瀉ְ
ֶ׃ׯ
,PUMJOזדכ ˟ הְֲ״+BWB 4XJGU鴟חכזְ
ד✉欽ׅה 汤ְ湡鋅ֲ
None
ㄎן⳿׃㼎韋ָ ♶僇然ח
⢽
⢽ class Point { var x = 0; var y
= 0 } var y = 0 // มએݴ val p = Point().apply { x = 3 y = 4 // Ͳͬͪͷ y? } println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗͦ͠͏
⢽ class Point { var x = 0; var y
= 0 } var y = 0 // มએݴ val p = Point().apply { x = 3 y = 4 // Ͳͬͪͷ y? } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ (※)
➿剏周
BMTP
➿剏周 class Point { var x = 0; var y
= 0 } var y = 0 val p = Point().apply { x = 3 y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ
➿剏周 BMTP class Point { var x = 0; var
y = 0 } var y = 0 val p = Point().also { it.x = 3 it.y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗ
せ➰ֹ䒷侧
➿剏周 class Point { var x = 0; var y
= 0 } var y = 0 val p = Point().apply { x = 3 y = 4 } println("p = (${p.x}, ${p.y})") // p = (3, 0) Λग़ྗ
➿剏周 せ➰ֹ䒷侧 class Point(val x: Int, val y: Int) var
y = 0 val p = Point( x = 3, y = 4 ) println("p = (${p.x}, ${p.y})") // p = (3, 4) Λग़ྗ
猘鋅
BQQMZ ״BMTP ך倯ָ㸜Ⰻ
➙儗ךⶰ⡲欽ָ㼰זְ 鏣鎘أة؎ٕז ⢪ֲ堣⠓ָקרזְ
את
BQQMZ SVO XJUIכ MFU BMTPד➿欽
דְְךדכ
None
׀䠐鋅꧊⚥
ΤϯδχΞืूத ͓ؾܰʹ࿈བྷ͍ͩ͘͞ʂ