Slide 1

Slide 1 text

2020/10/25 Recap Pointfree Vol. 1~3 iOSΞϓϦ։ൃͷͨΊͷFunctional Architecture৘ใڞ༗ձ

Slide 2

Slide 2 text

ࠓճͷRecapͷ΍Γํ • Pointfree Episode Vol 1 ~ 3 ͷ಺༰Λ΍͍͖ͬͯ·͢ • ͨͩ͠ɺ͢΂ͯ΍Δͷ͸͕࣌ؒڐ͢ݶΓ • ొஃऀͷPlaygroundͰRecapͨ͠Γ༡ΜͰ͍͖·͢ • ղઆ͠ͳ͕Β΍ΔͷͰʮ͜͏͍͏ͷͰ͖Δʁʯ
 ͱ͔৭ʑ஡ʑΛೖΕΔͷ͓͢͢ΊͰ͢

Slide 3

Slide 3 text

Pointfree ͱ͸ • ϓϩάϥϛϯάݴޠSwiftʹؔ͢ΔಈըͷγϦʔζ • ؔ਺ܕϓϩάϥϛϯάͱSwiftʹ͍ͭͯղઆ • Ұ෦Τϐιʔυ͸ߪಡ͕ඞਢ • https://www.pointfree.co/

Slide 4

Slide 4 text

“pointfree” ͱ͸ • pointfree ͱ͍͏୯ޠࣗମʹ͍ͭͯ΋ҙຯ͕͋Δ

Slide 5

Slide 5 text

pointfree-style • Haskellͷؔ਺ͷॻ͖ํʢελΠϧʣ • … So a 'points-free' definition of a function is one which does not explicitly mention the points (values) of the space on which the function acts. • … ͳͷͰɺʮpointfreeʯ ʹΑΔఆٛͱ͸ؔ਺͕࡞༻ ͢ΔۭؒͰɺ஋ʹ͸໌ࣔతʹ͸ݴٴ͠ͳ͍ఆٛΛ͞ ͍ͯ͠·͢ɻ

Slide 6

Slide 6 text

pointfree-style • ͨͱ͑͹ɺHaskell ͷ͜ͷॻ͖ํ f x = x + 1 Sun

Slide 7

Slide 7 text

pointfree-style • ஋(point) ʹݴٴ͠ͳ͍ॻ͖ํͩͱ͜͏ॻ͚Δ • ͜Ε͕ઌఔͷ f ͷpointfree style f = (+ 1) Sun

Slide 8

Slide 8 text

“pointfree” ͱ͸ • ༨ஊͰ͋ΓDeep Dive͢Δͱ࿩͕௕͘ͳΔͷͰׂѪ

Slide 9

Slide 9 text

ࠓ೔࿩͢Pointfree ͷ Episode ʹ͍ͭͯ • Vol 1. Functions • Vol 2. Side Effects • Vol 3. UIKit Styling with Functions

Slide 10

Slide 10 text

Vol 1. Functions • ͪΐͬͱมΘͬͨελΠϧͷؔ਺ʹؔ͢Δॻ͖ํ • ͜Ε͔Βͷ Episode ΛݟΔ্Ͱඞਢͷ಺༰ • ৽͍͠ԋࢉࢠͷ঺հ • |> ʹΑΔؔ਺ద༻, >>> ʹΑΔؔ਺ͷ߹੒

Slide 11

Slide 11 text

Vol 1. Functions • ݸਓతͳײಈ఺ • ֤ԋࢉࢠʹΑΔ, left-to-right ͳίʔυͷ࡞੒ • ؔ਺Λ “Composition” ͢Δͱ͍͏ߟ͑ํ

Slide 12

Slide 12 text

Vol 2. Side Effects • ʮ෭࡞༻Λ੍ޚ͢ΔʯʹϑΥʔΧεͨ͠ Episode • print ͷྫ • NumberFormatter ͷྫ • ԋࢉࢠ >=> ʹΑΔEffectΛ࣋ͬͨؔ਺ͷ߹੒ • ԋࢉࢠ <> ʹΑΔؔ਺ͷ߹੒ɺ<> ͷ ΦʔόʔϥΠυ

Slide 13

Slide 13 text

Vol 3. UIKit Styling with Functions • ࠓ·Ͱशͬͨ͜ͱΛͲͷΑ͏ʹ׆͔ͤΔ͔ʁ • ࣮ࡍʹίʔυ͕Massive ʹͳΓͦ͏ͳUIViewͷྫ

Slide 14

Slide 14 text

ࢀߟࢿྉ • https://www.pointfree.co/ • https://wiki.haskell.org/Pointfree