Skip to content

Instantly share code, notes, and snippets.

@tonnylitao
Last active October 25, 2015 14:15
Show Gist options
  • Save tonnylitao/b5761f708a21c308eead to your computer and use it in GitHub Desktop.
Save tonnylitao/b5761f708a21c308eead to your computer and use it in GitHub Desktop.
Why haskell is better than other programming language?
numCommonFriends x y = do
fx <- friendsOf x --database query, automatically work concurrently
fy <- friendsOf y --database query, automatically work concurrently
return (length (intersect fx fy))
-- NodeJS, Go, GCD, Java...other languages need extra code for concurrency,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment