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
zip
Search
kunou
July 07, 2017
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
zip
About zip function
kunou
July 07, 2017
More Decks by kunou
See All by kunou
GANについて
kunou
0
460
AIか何かについて.pdf
kunou
0
49
Pythonを書いていておーマジかーと感じたあれこれ
kunou
1
740
ネットワークグラフを作成する
kunou
0
75
Rubyで機械学習してみた
kunou
1
1.2k
ZIP!!
kunou
0
200
Make Mouse
kunou
0
670
RubyのProcのあれをこうしました
kunou
0
110
esm lt Clojure like threading macro
kunou
0
470
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.3k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Deep Space Network (abreviated)
tonyrice
0
350
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Leo the Paperboy
mayatellez
10
2.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
440
Transcript
覚えておくと 仕事で役立つ関数 n 選 esm ITS-BI 一斉会議 07.07.2017
覚えて置くと仕事で役立つ関数 n 選 よく使うもの map reduce filter distinct flatten zip
cycle sort apply take assoc remove rest
覚えて置くと仕事で役立つ関数 n 選 よく使うもの map reduce filter distinct flatten zip
cycle sort apply take assoc remove rest
覚えて置くと仕事で役立つ関数 n 選 よく使うもの map reduce filter distinct flatten zip
cycle sort apply take assoc remove 今日はコレの話をします rest
覚えて置くと仕事で役立つ関数 n 選 よく使うもの map reduce filter distinct flatten zip
cycle sort apply take assoc remove 今日はコレの話をします (時間の都合で) rest
覚えて置くと仕事で役立つ関数 n 選 zip
覚えて置くと仕事で役立つ関数 n 選 zip
覚えて置くと仕事で役立つ関数 n 選 zip これの話ではありません ☓
覚えて置くと仕事で役立つ関数 n 選 zip var array1 = [1, 2, 3,
4, 5]; var array2 = ['a', 'b', 'c', 'd', 'e'];
覚えて置くと仕事で役立つ関数 n 選 zip var array1 = [1, 2, 3,
4, 5]; var array2 = ['a', 'b', 'c', 'd', 'e']; __.zip(array1, array2);
覚えて置くと仕事で役立つ関数 n 選 zip var array1 = [1, 2, 3,
4, 5]; var array2 = ['a', 'b', 'c', 'd', 'e']; __.zip(array1, array2); => [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ], [ 4, 'd' ], [ 5, 'e' ] ]
覚えて置くと仕事で役立つ関数 n 選 zip ͜ΕɺԿʹ͑Δͷʁʁʁ var array1 = [1, 2,
3, 4, 5]; var array2 = ['a', 'b', 'c', 'd', 'e']; __.zip(array1, array2); => [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ], [ 4, 'd' ], [ 5, 'e' ] ]
覚えて置くと仕事で役立つ関数 n 選 zip var days = [ 2017-07-01, 2017-07-02,
2017-07-03, 2017-07-04, 2017-07-05, 2017-07-06, 2017-07-07, 2017-07-09, 2017-07-11]
覚えて置くと仕事で役立つ関数 n 選 zip var days = [ 2017-07-01, 2017-07-02,
2017-07-03, 2017-07-04, 2017-07-05, 2017-07-06, 2017-07-07, 2017-07-09, 2017-07-11] ͕ॳΊͯෆ࿈ଓʹͳΔ ॴΛͲ͏୳͠·͔͢ʁ
var days = [ 2017-07-01, 2017-07-02, 2017-07-03, 2017-07-04, 2017-07-05, 2017-07-06,
2017-07-07, 2017-07-09, 2017-07-11] 覚えて置くと仕事で役立つ関数 n 選 zip
覚えて置くと仕事で役立つ関数 n 選 zip var unmatchFirst = -1; for (var
i = 0; i < days.length - 1; i++) { var current = days[i], next = days[i + 1]; if (next.getDate() - current.getDate() != 1) { unmatchFirst = i; break; } }
覚えて置くと仕事で役立つ関数 n 選 zip var unmatchFirst = -1; for (var
i = 0; i < days.length - 1; i++) { var current = days[i], next = days[i + 1]; if (next.getDate() - current.getDate() != 1) { unmatchFirst = i; break; } } ͜Μͳײ͡ʁ
覚えて置くと仕事で役立つ関数 n 選 zip var unmatchFirst = -1; for (var
i = 0; i < days.length - 1; i++) { var current = days[i], next = days[i + 1]; if (next.getDate() - current.getDate() != 1) { unmatchFirst = i; break; } } ͜Ε͍·͠ΐ͏
覚えて置くと仕事で役立つ関数 n 選 zip __.zip(days, __.rest(days.concat([null])))
覚えて置くと仕事で役立つ関数 n 選 zip __.zip(days, __.rest(days.concat([null]))) => [ [ 2017-07-01,
2017-07-02 ], [ 2017-07-02, 2017-07-03 ], [ 2017-07-03, 2017-07-04 ], : [ 2017-07-11, null ] ]
覚えて置くと仕事で役立つ関数 n 選 zip __.zip(days, __.rest(days.concat([null]))) => [ [ 2017-07-01,
2017-07-02 ], [ 2017-07-02, 2017-07-03 ], [ 2017-07-03, 2017-07-04 ], : [ 2017-07-11, null ] ] ͜͜·ͰདྷΕউͪͰ͢Ͷ
覚えて置くと仕事で役立つ関数 n 選 zip __.chain(days). zip(__.rest(days.concat([null]))). initial(). map(([c, n]) =>
n.getDate() - c.getDate()). findIndex(diff => diff != 1). value();
覚えて置くと仕事で役立つ関数 n 選 zip __.chain(days). zip(__.rest(days.concat([null]))). initial(). map(([c, n]) =>
n.getDate() - c.getDate()). findIndex(diff => diff != 1). value(); => 6
覚えて置くと仕事で役立つ関数 n 選 zip __.chain(days). zip(__.rest(days.concat([null]))). initial(). map(([c, n]) =>
n.getDate() - c.getDate()). findIndex(diff => diff != 1). value(); => 6
覚えて置くと仕事で役立つ関数 n 選 まとめ ‣ zip便利 ‣ n 選といいつつ一つしか説明しませんでした。 ‣
もっと知りたい方は関数型勉強会へjoinして ください!