1. 7

I was inspired to John Hughes’s talk “Why Functional Programming Matters” to try to re-implement his example of numerical analysis with an infinite sequence in Ruby. It’s not as clean as the Haskell version but it was interesting to implement.

  1.  

  2. 1

    I wonder if there’s a way to “shoehorn” lazy evaluation into Ruby while both simplifying the interface and honoring its existing idioms. I like Ruby for a lot of reasons, but modularity and functional programming isn’t one of them aren’t two of them.

      1. 1

        I have half of another post drafted about all the problems I ran into when trying to implement this in Ruby. The tl;dr version is that internal and external iterator methods don’t play well together!

      2. 1

        I’ll admit when I saw “Exploring infinite sequences” I thought, aha, my favourite web site OEIS!

        Sadly it wasn’t.

        So for those geeks who haven’t met The On-Line Encyclopedia of Integer Sequences, here’s the link https://oeis.org/