Skip to content

Instantly share code, notes, and snippets.

@davidmason
Last active April 16, 2020 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidmason/336b17dfd91faee18147 to your computer and use it in GitHub Desktop.
Save davidmason/336b17dfd91faee18147 to your computer and use it in GitHub Desktop.
Just playing around... or perhaps a comprehension challenge. Can you figure out what this code does? Try it in http://elm-lang.org/try
import Html exposing (text)
main = drink rum ye scurvies |> yarrrrrr
drink up me hearties =
case hearties of
[] -> me
capn :: lads -> drink up me lads |> up capn
yarrrrrr = text << String.fromInt
rum = (+)
ye = 0
scurvies = [1, 2, 3, 4, 5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment