~/talk

How to Write a Fast, Reducible Collection

Talkat Clojure/conj 2017 · 2017-10-12..10-14· [functional-programming]
slides:none on file

Shows how to implement IReduceInit to make a collection that produces values without lazy seqs by calling the reducing function on each produced item, immediately checking reduced? and unwrapping to stop early. Demonstrates a simple range implementation with an index loop, using the three-arity reduce signature so transducers and into work (take short-circuits correctly). Gives a JDBC ResultSet example and a generic stateful producer pattern with a fin marker for replacing line-seq.

AI-written summary · about

  1. 0:00Intro
  2. 0:18Stream Fusion
  3. 0:43What is Stream Fusion
  4. 0:53Transducers
  5. 2:07Example
  6. 2:40Improvements
  7. 2:50Interface
  8. 3:11Steps
  9. 3:32Lazy Seek
  10. 3:42Skeleton
  11. 4:33Early Termination
  12. 6:04Outro
~/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.