Scalæ By the Bay has ended
Back To Schedule
Saturday, November 12 • 10:40am - 11:00am
This programmer modeled his code after wooden nesting dolls. What happens next will amaze you.

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Recursion has been called the GOTO of FP, yet we use it constantly – every `List` operation, every event loop, and myriad other places – it litters our code. So, how can we tame it? Can we at least contain it, if not eliminate it entirely? This talk introduces a new Typelevel library intended to free us from primitive recursion. Matryoshka contains a family of folds, unfolds, and transformations that can be applied to any recursive structure. We’ll learn how to separate the recursion from our logic and write “flat” operations that are more readily checkable by the compiler. We’ll also look at how the library allows us to fuse many transformations into one, handle short-circuiting, and even annotate data structures for free.

avatar for Greg Pfeil

Greg Pfeil

Senior Software Engineer, Formation
Greg has been working full-time with pure FP in Haskell and Scala for over six years. He currently abuses laziness for Formation, to extract efficient evaluation from exponential algorithms. He’s also known for inflicting recursion schemes on everyone and designing languages that... Read More →

Saturday November 12, 2016 10:40am - 11:00am PST