charmbracelet/glamour

Refine on sample of **Currying Artichokes**

Closed this issue · 3 comments

Randomly bump into this cool Currying Artichokes example.

A little tweak to make it more Haskell-ish:

module Main where

import Data.List (intercalate)

hello :: String -> String
hello s = "Hello, " <> s <> "."

main :: IO ()
main = putStrLn
     $ intercalate "\n"
     $ hello <$> [ "artichoke", "alcachofa" ]

You could even run this code in browser without ghc via https://play.haskell.org/saved/eqDThByg

Very nice. Want to submit a PR?

I could but on the second thought I think someone also need to update the screenshot (and the copy?) accordingly, which better leave to the owner, happy to review btw.

Welp, that was awesome. Thanks for opening this issue!