20171002-wejs

00580f6c11851d2fff0b3e2f7392226b?s=47 N. Shimizu
October 02, 2017

 20171002-wejs

Partial application in JavaScript. An application to factory method .

00580f6c11851d2fff0b3e2f7392226b?s=128

N. Shimizu

October 02, 2017
Tweet

Transcript

  1. 関数の話 @chikoski

  2. ؔ਺ɿखଓ͖ͷྻʹ໊લΛ͚ͭͨ΋ͷ GVODUJPOQPXFS B \ GPS MFUJJBB \ BB B ^

    SFUVSOB ^
  3. function宣言と アロー関数式 GVODUJPOJE WBMVF \ SFUVSOWBMVF ^ DPOTUJE WBMVF \

    SFUVSOWBMVF ^ DPOTUJEWBMVFWBMVF
  4. 関数はオブジェクト GVODUJPODSFBUF*E \ SFUVSOGVODUJPO WBMVF \ SFUVSOWBMVF
 ^ ^ DPOTUDSFBUF*E

     WBMVFWBMVF
  5. クロージャ GVODUJPOBEE4PNF WBMVF \ SFUVSOGVODUJPO B \ SFUVSOB WBMVF ^

    ^ DPOTUBEE4PNF WBMVFBB WBMVF DPOTUBEEBEE4PNF   BEE  
  6. 関数適用 DPOTUBEE B C B C BEE   BEEӕ

      Ӽ㊉⇹ BEE   BEEӕ   Ӽ㊉⇹ BEE BEE   BEE    BEEӕ   Ӓ   Ӽ㊉⇹ӁѬ ᒉӳӶӉ   ӼBEEӼ㊉⇹
  7. 部分適用 DPOTUBEE B C B C DPOTUBEE4PNFBCBEE B C 

    DPOTUBEEBEE4PNF   BEE  C ӒҮҰ㕉ᡔҶӑҷӵ ᐠᡔӘक㋚௻ӕ㕉ᡔҶ㊉⇹ҿӶӐҮӵӒӬ൐Ӷӵ BEE  
  8. 部分適用の利用例 DPOTUEPN UBH BUUST\^ \ DPOTUFM EPDVNFOUDSFBUF&MFNFOU UBH  GPS

    DPOTULFZJOBUUST \ FMTFU"UUSJCVUF LFZ BUUST<LFZ>  ^ SFUVSOFM ^
  9. 部分適用の利用例 DPOTUEJW  BUUST\^ EPN EJW BUUST  DPOTUBVEJP 

    BUUST\^ EPN BVEJP BUUST  DPOTUGJMF BUUST\^ \ BUUSTUZQFGJMF SFUVSOEPN JOQVU BUUST  ^
  10. ロジックの
 パラメータ化 DPOTUGJOE&WFO/VNCFSTMJTU\ DPOTUSFTVMU<> GPS DPOTUOVNPGMJTU \ JG OVN \

    SFTVMUQVTI OVN  ^ ^ ^ DPOTUMJTU"<    > DPOTUMJTU#GJOE&WFO/VNCFST MJTU"  < >
  11. ロジックの
 パラメータ化 DPOTUGJOE MJTU G \ DPOTUSFTVMU<> GPS DPOTUOVNPGMJTU \

    JG G OVN \ SFTVMUQVTI OVN  ^ ^ ^ DPOTUMJTU"<    > DPOTUMJTU#GJOE JJ  < >
  12. 部分適用 DPOTUGJOE MJTU G \ DPOTUSFTVMU<> GPS DPOTUOVNPGMJTU \ JG

    G OVN \ SFTVMUQVTI OVN  ^ ^ ^ DPOTU'JOEFSGMJTUGJOE G MJTU  DPOTUG'JOEFS JJ  GJOE MJTU JJ 
  13. 画面に描かれるキャラ DMBTT&OFNZ\ DPOTUSVDUPS QPTJUJPO  DPMMJEFS  SFOEFSFS \ UIJTQPTJUJPOQPTJUJPO

    UIJTDPMMJEFSDPMMJEFS UIJTSFOEFSFSSFOEFSFS ^ ^
  14. Renderer & Collider DPOTUSFOEFSFS'BDUPSZ J DY Q DYESBX*NBHF QY QZ

    J  DPOTUDJSDMF$PMMJEFS S Q Q EJTU Q Q S DPOTUSSFOEFSFS'BDUPSZ JNH  DPOTUDDJSDMF$PMMJEFS   DPOTUJOTUBODF'BDUPSZ LMBTTQOFXLMBTT Q S D  DPOTUFOFNZ'BDUPSZJOTUBODF'BDUPSZ &OFNZ  DPOTUFFOFNZ'BDUPSZ OFX1PTJUJPO