Functional Programming in Ruby
Functional Programming in Ruby
$5.00
Minimum price
$9.99
Suggested price
Functional Programming in Ruby

This book is 10% complete

Last updated on 2014-04-17

About the Book

This book teaches you not about what functional programming is. The target of this book is to help the reader to learn to think differently. Learning to program with a functional style will require you to do some rewiring in the brain. 

Instead this book helps you to un-learn some of the patterns you've been so very much used to, and learn new functional programming based patterns that help you build consise and efficient solutions to everyday programming problems. At the same time, it will put things in perspective and put functional programming in context, and discuss the limitations of functional programming in general and in Ruby specificially.

The end goal is that this book should help the reader to become a better programmer. A better programmer for me is someone who's flexible in approaching the problem domain. I'm a strong believer that in the near future, it's going to be more and more key for a developer to know many programming languages and many programming styles. 

That's also one of the reasons why I think Ruby is a good programming language to learn about functional programming style. It's far from perfect. It's not at all pure. It has limitations. But it allows you to mix and match different programming styles.

About the Author

koen handekyn
koen handekyn

Koen Handekyn is CEO of UP-nxt, the R&D business unit of UnifiedPost Group. He also holds the position of CTO at group level. Koen holds a degree in Computer Science engineering from UGent as well as a degree in Business Administration from Vlerick Leuven Gent Management School. Having worked at Alcatel-Lucent, he has a solid background in both telecommunications and innovation.

He has harbored a lifelong interest in software engineering and loves sharing his experiences with students whenever he is invited to act in a lecturer or guest professor capacity. He lives around Ghent and has a main office in Leuven but survives by embracing any and all available teleworking technologies alongside his team. Koen's been passionate about polyglot programming for more than two decades.

Table of Contents

  • Introduction
    • Continues Integration
    • Goal of this book
  • Getting Started
    • ‘For’ considered Harmful
      • Diving in with an Example
      • Comparing Styles
      • Conclusions
      • Short History of Functional Programming
      • The world of functional programming languages
    • The Power of Recursion
      • The beauty of Recursion
      • A study of faculty
      • Divide and concquer
      • Basic Math through recursion
      • Comparing styles
      • Typical list operations
  • Think Different
    • Different styles of Functions in Ruby
      • Defs
      • Lambda’s
      • Short Lambda’s
      • Lambda’s as constants
    • Functional Patterns in Standard Ruby
      • Functions as the Atoms of an Interface
      • Why Bang means Watch Out (Imutable)
      • Iterator and Visitor Revisited
      • No more Factory Method, Strategy, Template Method
    • Pulling your data through the blender
      • Functional processing of data: Filter-Sort-Map-Reduce
      • Group-Theory: Permutations-Combinations-Products
    • Advanced Recursion
      • Sorting Algorithms
      • Backtracking Algorithms
      • Recursive Data Structures
    • linkedlist
    • tree
    • graph
  • More Purity in your thoughts
    • Combining Functions into Programs
      • What’s in a name?
      • Default Parameters and Partial Evoluation
      • Combining Functions into Programs
    • Advanced Data Processing
      • Infinite Data Structures and laziness
      • List Comprehensions
      • Constraint Programming
    • Building our own Prelude
      • Basic Prelude
      • Math Prelude
      • List Prelude
      • Text Prelude
      • Revisiting prior Examples
    • Coming back to the basic algorithms
    • Backtracking algorithms: rewrite
    • What you are missing in Ruby (and workarounds)
      • Pattern matching
      • Lazy evaluation
  • In the field
      • Testing functional code
      • Mixing styles
    • Performance Concerns
    • Sidenotes that appear within the basic text
    • Other topics

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub