Skip to content

Instantly share code, notes, and snippets.

View patch's full-sized avatar

Nova Patch patch

View GitHub Profile
@patch
patch / perl6_one_liners
Last active October 27, 2017 14:05 — forked from djhworld/haskell_one_liners
Perl 6 One Liners
-- 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"