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

20171002-wejs

chikoski
October 02, 2017

 20171002-wejs

Partial application in JavaScript. An application to factory method .

chikoski

October 02, 2017
Tweet

More Decks by chikoski

Other Decks in Technology

Transcript

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

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

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

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

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

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

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

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

    G OVN \ SFTVMUQVTI OVN  ^ ^ ^ DPOTU'JOEFSGMJTUGJOE G MJTU  DPOTUG'JOEFS JJ  GJOE MJTU JJ 
  9. 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