Transcript
  • 1. Purely Functional Data Structures Demystied Mohit Thatte Functional Conf 2014, Bangalore
  • 2. About Me Work The great outdoors @mohitthatte github.com/pastafari
  • 3. Why? What? Learnings
  • 4. Image: User:Matthew,Wikimedia Commons
  • 5. Programs that use Maps Towers of Abstraction Map as ADT Map implementation Primitives
  • 6. Image: https://www.ickr.com/photos/cverdier/4321365261
  • 7. Any sufciently advanced data structure is indistinguishable from magic With apologies to Arthur C. Clarke!
  • 8. Why? What? Learnings
  • 9. Data Structures
  • 10. AbstractionsData
  • 11. Abstract Data Type Invariants Stack push, pop LIFO Name Operations ADT
  • 12. Image: Apollo 8,NASA
  • 13. Change perspective Think like a data structure designer
  • 14. The ADT Challenge Given an ADT, give a correct implementation of all operations.
  • 15. Source: https://www.ickr.com/photos/manicstreetpreacher/5310984196/
  • 16. You can program in any language you want as long as it is imperative
  • 17. make it easier to reason about code Why Functional? Immutability Persistence
  • 18. x = 5 y = x + 1 pr!nt x x = [1,2] y = x

Recommended