Skip to content

Instantly share code, notes, and snippets.

@theqp
Last active February 13, 2021 04:03
sumOfSquares = (+) `on` square
sumOfLargestTwoSquared x y z =
uncurry
sumOfSquares
$ if x > y
then (x, max y z)
else (y, max x z)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment