This file contains 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
-- Inspired by http://solog.co/47/10-scala-one-liners-to-impress-your-friends/ | |
# Double everything in a list | |
(1..10).map(* * 2) | |
# Sum a list of numbers | |
(1..1000).sum | |
# TODO: Verify if exists in a string | |
#any (`elem` ["haskell", "ghc", "monads", "cabal"]) $ words "this is a piece of example text talking about haskell and ghc" |