Skip to content

Instantly share code, notes, and snippets.

@forketyfork
Created May 11, 2021 06:56
Show Gist options
  • Save forketyfork/19d099b6596e3cc07b19e3c1772b3037 to your computer and use it in GitHub Desktop.
Save forketyfork/19d099b6596e3cc07b19e3c1772b3037 to your computer and use it in GitHub Desktop.
Code to article "Why You Should Learn Functional Programming: Type Classes vs. Interfaces"
newtype Sum a = Sum { getSum :: a }
newtype Product a = Product { getProduct :: a }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment