Upgrade to Pro — share decks privately, control downloads, hide ads and more …

生活発表 #2

生活発表 #2

8aebb410308ec2c655550798e92cd2df?s=128

ken3ypa

July 19, 2019
Tweet

Transcript

  1. ΏΔ5ൃද !LFOZQB 1

  2. ͸͡Ίʹ 2

  3. ͱ͋Δ3BJMT(JSMTͷճ 4

  4. ɹࢀՃऀ ɹʮ޷͖ͳϝιου͸ͳΜͰ͔͢ʁʯ 5

  5. ɹࢀՃऀ ɹʮͦ͏ฉ͘ͱձ࿩͕ଓ͘ͱฉ͍ͨͷͰʯ 6

  6. ͳΔ΄Ͳ 7

  7.  3VCZJTUͨΔ΋ͷ ޷͖ͳϝιουʹҰՈݴ͋Δ ͋Δ͍͸ͦ͏ࢥΘΕ͍ͯΔ  ʜΒ͍͠ʁ 8

  8. Δͼ·3VCZJTU)PUMJOLTʹ΋  ʮ޷͖ͳϝιουʯΛ  ฉ͘ίʔφʔ͕͋Δ͠ 9

  9. ͱ͍͏Θ͚Ͱɺ 11

  10. ࠓճͷςʔϚ 12

  11. 3VCZͷ޷͖ͳϝιουબ 14

  12. ᶃ Enumerable#inject 17

  13. ޷͖ͳཧ༝ εοΩϦ͔͚Δ 18

  14. ᶃ&OVNFSBCMFJOKFDU TVN   FBDI\cJcTVN J^ QTVN   ͔ΒΛ଍͍ͯ͘͠ॲཧΛ۪௚ʹFBDIͰॻ͘

    19
  15. ᶃ&OVNFSBCMFJOKFDU Q  JOKFDU\cTVN JcTVN J^   JOKFDUͰॻ͖׵͑Δ 20

  16. ᶃ&OVNFSBCMFJOKFDU Q  JOKFDU     ͞ΒʹΤϨΨϯτʂʂʂ 

     ͕إจࣈͬΆ͘ݟ͑Δͷ΋ϙΠϯτߴ͍ 21
  17. ᶄ&OVNFSBCMFUBMMZ 22

  18.  ޷͖ͳཧ༝ ࣗ෼Ͱ࣮૷ͨ͜͠ͱ͕͋Γ  ࢥ͍ೖΕ͕͋Δ 23

  19. ᶄ&OVNFSBCMFUBMMZ XPSETHPPEHPPECBECBEOPOF XPSETTQMJU  FBDI@XJUI@PCKFDU \^ \cJUFN IBTIc  IBTI<JUFN>IBTI<JUFN>UP@J

    ^ \HPPE CBE OPOF^  ୯ޠͷग़ݱճ਺ΛٻΊɺϋογϡͰग़ྗ  UBMMZͷॲཧΛࣗલͰ࣮૷  UP@Jͯ͠ ͯ͠Δॴͱ͔࠷ߴʹ໺฻͍ͬͨ 24
  20. ᶄ&OVNFSBCMFUBMMZ XPSETHPPEHPPECBECBEOPOF XPSETTQMJU HSPVQ@CZ JUTFMG  USBOTGPSN@WBMVFT DPVOU  \HPPE

    CBE OPOF^  ͪΐͬͱΦγϟϨͳϝιουΛ֮͑ͨ  ࣮૷ύλʔϯ͕৭ʑ͋ͬͯ໘ന͍ 25
  21. ᶄ&OVNFSBCMFUBMMZ XPSETHPPEHPPECBECBEOPOF XPSETTQMJUUBMMZ \HPPE CBE OPOF^  ͜Ε͕3VCZͷྗͩʜʂ  ͱͯ΋εοΩϦͨ͠ʜ

    26
  22. ᶅ.PEVMFBODFTUPST 27

  23.  ޷͖ͳཧ༝ 3VCZͷԞਂ͞Λڭ͑ͯ͘Εͨ 28

  24. ᶅ.PEVMFBODFTUPST NPEVMF#BSFOE NPEVMF#B[FOE DMBTT'PP  JODMVEF#BS  QSFQFOE#B[ FOE Q'PPBODFTUPST

    <#B[ 'PP #BS 0CKFDU ,FSOFM #BTJD0CKFDU>  SFRVJSFͱJODMVEFͷ۠ผ΋͔ͭͳ͍ࣗ෼Ͱ͕ͨ͠  ܧঝπϦʔͷଘࡏΛ஌Γ΋͏ؒҧ͑ͳ͍ 29
  25. ᶆ4USJOHSKVTU 30

  26.  ޷͖ͳཧ༝ 3VCZΛ਎ۙʹײͤͯ͘͡͞Εͨ 31

  27. ᶆ4USJOHSKVTU DBSE@OVNT QDBSE@OVNTTMJDF  SKVTU     

      ΫϨδοτΧʔυͷԼܻͷΈදࣔ͠࢒Γ͸ϚεΫ  ͜ΕͰ࡞ΕΔͷ͔ʔʂͱ3VCZΛ਎ۙʹײͨ͡ 32
  28. ᶇ Array#shuffle 33

  29. ޷͖ͳཧ༝ "SSBZTIVGqF͕޷͖ͱ͍͏ΑΓɺ  ͦΕʹ·ͭΘΔ࿩͕͠޷͖ IUUQTXXXBUNBSLJUDPKQOFXT  SVCZIUNM 34

  30. lZVHVJ ͦΕ͸ɺίϨΫγϣϯ͕͋ͬͯγϟοϑ ϧ͍ͨ͠ͱࢥͬͨΒɺTIVGqFͱॻ͍ͯͦΕͰಈ ͔ͳ͖Ό͍͚ͳ͍ΜͰ͢Αɻ “ 35

  31. “ ·ͭ΋ͱ͋ͬ͸ͬ͸ɻγϟοϑϧͰ͖Δ͸ͣͩ ͱɻͰ͖ͳ͚Ε͹3VCZͷόάͩͱɻ “ 36

  32.  3VCZ͸ʮ௚ײతʹॻ͚Δʯ ͦͯ͠ʮॻ͚Δ΂͖ʯݴޠͳΜͩͳ  ͱ͍͏ͷΛ৺Ͱײͨ͡ 37

  33. ᶈ&OVNFSBUPSXJUI@JOEFY 38

  34. ޷͖ͳཧ༝  ศར 39

  35. ᶈ&OVNFSBUPSXJUI@JOEFY  B[ FBDI@XJUI@JOEFYEPcBMGBCFU JOEFYc  QVUT/P\JOEFY ^\BMGBCFU^ FOE /PB

    /PC /PD   ͕ؾʹͳΔ  ͦ͏Ͷɺ͸͡·Γͩ΋ͷͶʜ 40
  36. ᶈ&OVNFSBUPSXJUI@JOEFY  B[ FBDIXJUI@JOEFY  EPcBMGBCFU JOEFYc  QVUT/P\JOEFY^\BMGBCFU^ FOE

    /PB /PC /PD   ॳظ஋Λઃఆग़དྷΔ͓ӄͰ ͕ফ͑ͨ  ͋Γ͕ͱ͏ɺXJUI@JOEFY 41
  37. ᶉ"SSBZqBUUFO 42

  38.  ޷͖ͳཧ༝ Ωϝͨͱ͖ͷ૘շײ 43

  39. ⑦ Array#flatten <<OJM B OJM <> B> <B OJM> <B

    B>> ͜Μͳअѱͳ഑ྻ͕͋ͬͨͱͯ͠΋ 44
  40. ᶉ"SSBZqBUUFO <<OJM B OJM <> B> <B OJM> <B B>>qBUUFO

    <OJM B OJM B B OJM B B>  BUUFOͳΒ៉ྷʹͯ͘͠ΕΔ͠ 45
  41. ᶉ"SSBZqBUUFO <<OJM B OJM <> B> <B OJM> <B lBz>>qBUUFO

    ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹDPNQBDU ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹVOJR <B> DPNQBDUɺVOJRͱ૊߹ΘͤΔͱߋʹؾ͕͍͍࣋ͪ
  42.  ᶊ4USJOHTDBO ໊લͱڍಈ͕௚ײతͰ޷͖ 47

  43. ᶊ4USJOHTDBO  ݪޠ  ུޠ 1PSUBCMF/FUXPSL(SBQIJDT 1/( 3VCZPO3BJMT 303 'JSTU*O

    'JSTU0VU '*'0 4PNFUIJOH*NBEFVQGSPNUIJOBJS 4*.6'5" ͜͏͍͏ɺ୯ޠͷ಄͚ͩΛநग़ͯ͠ ུޠΛ࡞Γ͍ͨॠ͕ؒ ͋ͳͨͷ3VCZਓੜʹ๚Εͨͱ͢Δ ͔͕͠͠अຐͦ͏ 48
  44. ᶊ4USJOHTDBO DMBTT"DSPOZN  EFGTFMGBCCSFWJBUF UFYU   UFYUHTVC  

     ɹɹɹɹTQMJU ɹɹɹɹNBQ\cXPSEcXPSE<>^ ɹɹɹɹKPJOVQDBTF  FOE FOE  ͜͏͍͏໺฻͍ͬͨॲཧ΋ 49
  45. ᶊ4USJOHTDBO DMBTT"DSPOZN  EFGTFMGBCCSFWJBUF UFYU   UFYUHTVC  

     ɹɹɹɹTQMJU ɹɹɹɹNBQ\cXPSEcXPSE<>^ ɹɹɹɹKPJOVQDBTF  FOE FOE DMBTT"DSPOZN  EFGTFMGBCCSFWJBUF UFYU   UFYUTDBO aCaX KPJOVQDBTF  FOE FOE  TDBOͳΒ͜͏͔͚Δڍಈͱ໊લ͕ͦΕͬΆ͍ 50
  46. ᶋ#BTJD0CKFDUJOTUBODF@FWBM 51

  47. ޷͖ͳཧ༝ ϫΫϫΫ͢Δʂ 52

  48. 53 JOTUBODF@FWBM Ϩγʔό ʹऔͬͨ Πϯελϯεͷ ίϯςΩετͰ \ϒϩοΫ^ ʹऔͬͨ ॲཧΛ࣮ߦͰ͖Δ

  49. ͦͷϫΫϫΫ͢ΔڍಈΛ 54 ͜ͷલൃද͖ͯ͠·ͨ͠ IUUQTTQFBLFSEFDLDPNLFOZQB UBNBSVCZLBJHJLPXBLVOBJETM

  50. ᶌ0CKFDUUBQ 55

  51. ޷͖ͳཧ༝  ָ͍͠ʂʂ 56

  52. ᶌ0CKFDUUBQ Q<<OJM B OJM <> B>   <B OJM>

    <B B>>UBQ NFUIPE Q   qBUUFOUBQ NFUIPE Q   DPNQBDUUBQ NFUIPE Q   VOJR <<OJM B OJM <> B> <B OJM> <B B>> <OJM B OJM B B OJM B B> <B B B B B> <B>  ͖ͬ͞ͷअѱ͞ϚγϚγͷ഑ྻॲཧ΋  ϝιουνΣʔϯͰԿΛ΍ͬͯΔ͔֬ೝग़དྷΔ 57
  53. ᶌ0CKFDUUBQ BMQIBCFU@OVNT\^  B[ FBDIXJUI@JOEFY  EPcBMQIBCFU JOEFYc  BMQIBCFU@OVNT<BMQIBCFU>JOEFY

    FOE  ݟࣦ͍͕ͪͳॳظ஋ͱฦΓ஋΋ BMQIBCFU@OVNT\^UBQEPcIBTIc  B[ FBDIXJUI@JOEFY  EPcBMQIBCFU JOEFYc  IBTI<BMQIBCFU>JOEFY  FOE FOE  Ұ౓ͷॲཧʹ·ͱΊ͓͚ͯΔ 58
  54. ᶌ0CKFDUUBQ   FBDI\cJc  QVUTJUBQ\CSFBL'J[[JG J [FSP ^ ɹɹɹɹUBQ\CSFBL#V[[JG

    J [FSP ^ ɹɹɹɹUBQ\CSFBL'J[[#V[[JG J [FSP ^^  'J[[#V[[ͩͬͯϫϯϥΠφʔͰΫϦΞग़དྷΔͧʂ 59
  55. ·ͱΊ  εοΩϦ͔͚Δศརָ͍͠  Ωϝͨͱ͖ͷ૘շײ  ࣗ෼Ͱ࣮૷ͨ͜͠ͱ͕͋Γࢥ͍ೖΕ͕͋Δ  ͦΕʹ·ͭΘΔ࿩͕޷͖ 

    ໊લͱڍಈ͕௚ײతͰ޷͖  Θ͘Θ͘͢Δ  3VCZͷԞਂ͞Λڭ͑ͯ͘Εͨ  3VCZΛ਎ۙʹײͤͯ͘͡͞Εͨ 60