0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# Underscore

13,155

Published on

Published in: Technology
1 Comment
6 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No

Are you sure you want to  Yes  No
Views
Total Views
13,155
On Slideshare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
60
1
Likes
6
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. “Hey Underscore,You’re doing it wrong”You’re doing it wrong”
• 2. I <3 _
• 3. So what’s wrong then?
• 4. Agenda• Currying• Composition• Functors• Random stuff
• 5. Currying
• 6. Curried Function“A function that will return a new function until it receives all it’s arguments”
• 7. ...weird
• 8. Wu.js to the rescue! (well, one function at least) (well, one function at least)
• 9. not weird
• 10. Example
• 11. 0 0 ExampleFunctional Underscore
• 12. 1 0 ExampleFunctional Underscore
• 13. 2 0 ExampleFunctional Underscore
• 14. 3 0 ExampleFunctional Underscore
• 15. underscore’s apiprevents you from currying
• 16. Currying• Make generic functions - data is gone• Build new functions by applying args• Much more concise definitions• Make types “line up” for composition
• 17. Composition
• 18. Category Theory“The mathematical theory of transforming values and crap” *inaccurate definition
• 19. Example
• 20. 3 0 ExampleFunctional Underscore
• 21. 4 0 ExampleFunctional Underscore
• 22. 5 0 ExampleFunctional Underscore
• 23. underscorepromotes chain as the function of choice.
• 24. Composition• Build new functions from other functions• Helps build generic programs w/o args• Extremely high level coding• Mathematically backed
• 25. Functors
• 26. Example
• 27. 5 0 ExampleFunctional Underscore
• 28. 6 0 ExampleFunctional Underscore
• 29. 7 0 ExampleFunctional Underscore
• 30. underscore explicitly prevents extending map
• 31. s• Change behavior without altering function open/closed principle• Not just map - reduce, compose, etc• Intuition and “non proprietary” api• Free formulas• Dynamic type safety?
• 32. In conclusion