Function Applicative for Great Good of Leap Year Function

Polyglot FP for Fun and Profit – Haskell and Scala

https://fpilluminated.com/deck/238

This deck is about the leap_year function shown in x.com, i.e.

leap_year :: Integral a => a -> Bool
leap_year = liftA2 (>) (gcd 80) (gcd 50)

Given an integer representing a year, the function returns a boolean indicating if that year is a leap year.

See why the Function Applicative allows the leap_year function to be defined as shown in that tweet.