Cat Talks Series: Lens, CPS Transformation, and F‑Algebra Sessions
The article summarizes a series of technical talks held in August and September covering functional programming concepts such as Lens, Continuation‑Passing Style transformation, and F‑algebra with detailed explanations, demos, and theoretical insights for developers and researchers.
On August 19, the talk titled “Lens” presented by Tristen introduced the Traversable pattern, explained the traverse function, and derived the Lens type by progressively relaxing higher‑order type constraints, showing how getters, setters, and folds combine into a composable lens.
On August 27, Xinyuan delivered a session on “CPS transformation”, describing the purpose of Continuation‑Passing Style in compilers, demonstrating a simplified Lisp implementation of CPS transformation, sharing techniques for generating shorter code, and referencing a notable 40‑line example by Wang Yin.
On September 16, the first part of “F‑algebra (1/2)” was presented by Xinyuan, introducing the category‑theoretic concept of F‑algebra, its carrier type and evaluator, defining homomorphisms between F‑algebras, constructing the associated category, and identifying the initial object as a familiar recursive data type.
On September 30, the second part “F‑algebra (2/2)” continued the discussion by exploring catamorphisms, illustrating that the initial algebra Nat corresponds to iteration and List[Int] to the common fold operation, explaining how to find an initial algebra for a given functor using Adámek’s algorithm, and applying Lambek’s theorem to guarantee isomorphism of the evaluator.
The series concludes with a note that video recordings are available on Bilibili under the “比图科技” account, and interested participants can contact the author via [email protected] . The author of the article is Xinyuan Zhang, a backend engineer at Tubi.
Bitu Technology
Bitu Technology is the registered company of Tubi's China team. We are engineers passionate about leveraging advanced technology to improve lives, and we hope to use this channel to connect and advance together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.