Skip to content

Instantly share code, notes, and snippets.

@Beneboe
Beneboe / scombinator.md
Created October 16, 2021 10:55
The connection between the apply function and the s combinator

The Connection between Apply and S combinator

I recently came across a video (https://youtu.be/UogkQ67d0nY?t=703) that looked at a problem and compared the solutions in Scala and Haskell.

The scala solution:

def maximumDifference(nums: Array[Int]): Int =
    nums.scanLeft(Int.MaxValue)(_ min _)
        .tail
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing