Skip to content

Comment on Vim Croquetparent

Comments

map (format "The %s thing with Haskell is that it can be extremely compact") ["nice thing", "problem"]

(disclaimer: that probably isn't actual Haskell syntax.)

    mapM_ (printf "The %s thing with Haskell is that it can be extremely compact\n")
          ["nice thing", "problem"]
This works. :)

Alternatively, you could do this:

    forM_ ["nice thing", "problem"] $
          printf "The %s thing with Haskell is that it can be extremely compact\n"

map (("The "++).(++" with Haskell is that it can be extremely compact")) ["nice thing", "problem"]

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.