Functions in JavaScript

00580f6c11851d2fff0b3e2f7392226b?s=47 N. Shimizu
December 22, 2017

Functions in JavaScript

00580f6c11851d2fff0b3e2f7392226b?s=128

N. Shimizu

December 22, 2017
Tweet

Transcript

  1. 関数の話 @chikoski

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

    SFUVSOWBMVF ^ DPOTUJEWBMVFWBMVF
  3. 関数適用 DPOTUBEE B C B C BEE   BEEӕ

      Ӽ㊉⇹ BEE   BEEӕ   Ӽ㊉⇹ BEE BEE   BEE    BEEӕ   Ӓ   Ӽ㊉⇹ӁѬ ᒉӳӶӉ   ӼBEEӼ㊉⇹
  4. パイプライン演算子 DPOTUEPVCMFOO  DPOTUBEE0OFOO  DPOTUNPE B C BC DPOTUWBMVF

    NPE BEE0OF EPVCMF    WBMVF]EPVCMF ]BEE0OF ] ONPE O   https://github.com/tc39/proposal-pipeline-operator
  5. 関数適用は遅い DPOTUWBMVF NPE BEE0OF EPVCMF    DPOTUWBMVF 

      
  6. 末尾呼び出し GVODUJPOBEE B C \ SFUVSOB C ^ GVODUJPOBEE0OF B

    \ SFUVSOBEE B   ^ BEE0OF  
  7. 末尾呼び出し GVODUJPOBEE B C \ DPOTUDB C SFUVSOD ^ GVODUJPOBEE0OF

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

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

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

    ^ DPOTUBEE4PNF WBMVFBB WBMVF DPOTUBEEBEE4PNF   BEE  
  11. 部分適用 DPOTUBEE B C B C DPOTUBEE4PNFBCBEE B C 

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

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

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

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

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

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

    UIJTDPMMJEFSDPMMJEFS UIJTSFOEFSFSSFOEFSFS ^ ^
  18. 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