78
Purely Functional Data Structures Demystified Mohit Thatte Functional Conf 2014, Bangalore

Purely functional data structures demystified

Embed Size (px)

DESCRIPTION

I spoke about 'Purely Functional Data structures' at Functional Conference 2014 in Bangalore. These are my slides with an extra section on further study. This talk is based on Chris Okasaki's book title Purely Functional Data Structures. The gist is that immutable and persistent data structures can be designed without sacrificing performance.

Citation preview

  • 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