Skip to content

Instantly share code, notes, and snippets.

@dullbananas
Created March 24, 2020 02:35
Show Gist options
  • Save dullbananas/506c15dfe83d662b60d791c186e42858 to your computer and use it in GitHub Desktop.
Save dullbananas/506c15dfe83d662b60d791c186e42858 to your computer and use it in GitHub Desktop.
Totally normal program
module NeverGonna exposing (main)
import Html exposing (..)
main : Html Never -- gonna give you up
main =
let
neverGonna : List String
neverGonna =
[ "give you up"
, "let you down"
, "run around and desert you"
, "make you cry"
, "say goodbye"
, "tell a lie and hurt you"
]
|> List.map ((++) "Never gonna ")
noStrangersToLove : List String
noStrangersToLove =
[ "We're no strangers to love"
, "You know the rules and so do I"
, "A full commitment's what I'm thinking of"
, "You wouldn't get this from any other guy"
]
justWannaTellYou : List String
justWannaTellYou =
[ "I just wanna tell you how I'm feeling"
, "Gotta make you understand"
]
knownEachOther : List String
knownEachOther =
[ "We've known each other for so long"
, "Your heart's been aching but you're too shy to say it"
, "Inside we both know what's been going on"
, "We know the game and we're gonna play it"
]
andIfYouAsk : List String
andIfYouAsk =
[ "And if you ask me how I'm feeling"
, "Don't tell me you're too blind to see"
]
neverGonnaGive : List String
neverGonnaGive =
let
neverGonnaGive2 : String
neverGonnaGive2 =
"Never gonna give, never gonna give"
in
[ neverGonnaGive2
, "(Give you up)"
, "(Ooh) " ++ neverGonnaGive2
]
parts : List (Html Never)
parts =
[ noStrangersToLove
, justWannaTellYou
, neverGonna
, knownEachOther
, andIfYouAsk
, neverGonna ++ neverGonna
, neverGonnaGive
, knownEachOther
, justWannaTellYou
, neverGonna ++ neverGonna ++ neverGonna
]
|> List.map partToParagraph
in
div [] parts
partToParagraph : List String -> Html Never -- gonna let you down
partToParagraph lines =
lines
|> List.map text
|> List.intersperse (br [] [])
|> p []
@dullbananas
Copy link
Author

Never gonna give Elm up

Gonna give JavaScript up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment