~/talk

Laziness, trampolines, monoids and other functional amenities

Talkat Lambda World 2015 · on Saturday, 2015-10-24· [java, functional-programming]
slides:none on file

Shows concrete Java 8 code: implements currying for converters and composes a Celsius↔Fahrenheit pipeline; models salary rules as composed endomorphisms and uses monoid composition to build reusable calculators; demonstrates that naive infinite streams for primes blow the stack, then builds a lazy list and a trampoline to produce an infinite prime generator without StackOverflowError; measures no compiler TCO in Java so the trampoline and suppliers are necessary workarounds, and the examples compile and run as shown.

AI-written summary · about

  1. 0:00Intro
  2. 0:20Laziness
  3. 6:08Essence of Functional Programming
  4. 8:36Higher-order functions
  5. 9:47A strategy pattern Converter
  6. 10:41Using the Converter
  7. 11:58A functional Converter
  8. 13:51Currying
  9. 16:13More Function Composition
  10. 20:15Endomorphisms & Monoids
  11. 24:02FluentEndo Monoid
  12. 26:06A Functional Salary Calculator ...
  13. 28:52Lary Evaluation
  14. 29:02Creating a Stream of prime numbers
  15. 31:10Recursively creating a stream of primes
  16. 33:35Lazy evaluation in Scala
  17. 34:02Implementing a lary list in Java
  18. 34:53and its lary filter
  19. 36:19Back to generating primes
  20. 37:10Printing primes
  21. 37:47Iteration vs. Recursion
  22. 42:29Another Recursive Example
  23. 43:23What's the problem?
  24. 44:07Tail Call Optimization
  25. 45:51from Recursion to Tail Recursion
  26. 47:42Tail Recursion in Scala
  27. 48:53Tail Recursion in Java?
  28. 49:14Trampolines to the rescue
  29. 49:54Implementing the TailCall
  30. 51:49Using the Trampoline
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.