Tag: functional programming
Functional Programming is a programming paradigm … that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, … programming is done with expressions or declarations instead of statements.
In functional code, the output value of a function depends only on the arguments that are passed to the function; calling a function f twice with the same value for an argument x produces the same result f(x) each time [because there is no mutable state]
Lazy Zip
Shiny protons! Infinite streams! Producer blocks! Lazy enumerators! In this video about using a functional style to work with potentially infinite col…
Function Pipelining in Ruby
Have you ever looked at function "pipelines" in FP languages like Elixir and F# and wished Ruby had them? Let's explore the equivalents Ruby provides …
Function Composition Operators
Ruby's support for functional programming has expanded and matured. Join guest chef Devon Estes and learn to use some features added in Ruby 2.6 to qu…
Partial Function Application
If you've ever read about functional programming, you might have run across the concept of "currying". But what is currying, exactly, and how does it …
yield_self
Discover how to use Ruby's `yield_self`/`then` method to organize methods into neat pipelines of operations! Join guest chef Nithin Bekal for an educa…
Detect Map
A tricky little functional programming puzzle, with an elegant solution.
Safe Navigation Part 3: Everything is Optional
Applying an approach inspired by functional programming languages to the problem of safe navigation.
Itself
Today's episode covers a new Ruby 2.2 feature which is more useful than it may at first appear to be.
Referential Transparency
In this episode we'll discover a particularly insidious side effect of implicit global I/O dependencies.