Created
May 12, 2020 12:41
-
-
Save tarquin-the-brave/96a4ee0cfedbb41bd548ed89989367e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Which bodies do not orbit anything? | |
roots :: Eq a => [(a,a)] -> [a] | |
roots orbits = [x | (x, y) <- orbits, notElem x . fmap snd $ orbits] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment