Functional js class

667 views

Published on

Function Javascript 101 Class (Abridged)

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
667
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Functional js class

    1. 1. Functional Js Class
    2. 2. First Class Functions
    3. 3. Exercises
    4. 4. Loops
    5. 5. Imperative vsDeclarative
    6. 6. Exercises
    7. 7. Type Signatures
    8. 8. Type Signatures• Tell you a “ton” about the function• Very helpful when doing point free• http://haskell.org/hoogle/• http://ttic.uchicago.edu/~dreyer/course/ papers/wadler.pdf (theorems for free)• https://vimeo.com/28069495 (data driven dev)
    9. 9. Purity
    10. 10. What’s Impure• Mutations• References to things outside the function• Side effects (logging, db, http, ui)• Given the same argument, it can give different output
    11. 11. Pure Functions• Portable• Parallelizable• Reusable• Easily tested• Easy to reason about
    12. 12. Partial Application
    13. 13. Curried Function “A function that takes one argument at a time”
    14. 14. Partial Application• Build new functions• “Freeze” state• Make types “line up”• Composition
    15. 15. Exercises
    16. 16. Composition
    17. 17. Category Theory“The mathematical theory of function composition” *inaccurate definition
    18. 18. Exercises
    19. 19. Composition• Build new functions from other functions• Declarative• Mathematically backed• Cornerstone of functional programs
    20. 20. Design
    21. 21. Review• Loops• First class functions• Declarative vs Imperative• Type signatures• Purity• Partial application• Composition• Module Design

    ×