Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Functional Programming with examples

felipe
November 20, 2019

Functional Programming with examples

felipe

November 20, 2019
Tweet

More Decks by felipe

Other Decks in Technology

Transcript

  1. 2 Lambda Calculus (1930) LISP (1958) ML (1973) John Backus

    Paper (1978) Haskell (1990) SICP (1985) Clojure (2007) Idris (2012)
  2. 3

  3. immutability 5 >>> a = [1, 2, 3, 4] >>>

    a.append(5) >>> a [1, 2, 3, 4, 5] >>> from pyrsistent import pvector >>> a = pvector([1, 2, 3, 4]) >>> a.append(5) pvector([1, 2, 3, 4, 5]) >>> a pvector([1, 2, 3, 4])
  4. immutability 6 list plist access O(1) O(log32 n) -> Na

    prática O(1) append O(1) O(log32 n) -> Na prática O(1)
  5. “A typeclass is a sort of interface that defines some

    behavior. If a type is a part of a typeclass, that means that it supports and implements the behavior the typeclass describes.” Learn You a Haskell for Great Good! type classes 28
  6. where to learn more? 32 • https://purelyfunctional.tv/article/ • https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp9 0.pdf

    • https://www.amazon.com/dp/1617291412/ref=cm_sw_r_cp_ep_dp _TIbkAbAM04EN7 • https://lispcast.com/category/writing/ • https://www.youtube.com/user/DrBartosz/playlists