News for hackers. Stuff that matters.
Re:Why Clojure? (2010) by fnordsensei on Friday December 30, 2016 @05:05AM (#13283608)
I would probably use threading to achieve comparable readability.

  (def sazerac 
    (-> (mix :ice :whiskey :bitters :absinthe)
        shake
        strain
        garnish))

  (drink :me sazerac)
I never had a Sazerac. It sounds like a nice drink.
Re:Why Clojure? (2010) by greydius on Friday December 30, 2016 @07:15AM (#13283997)
I would create a Cocktail data structure and an instance of Monad for it.

    sazerac = do
        add ice
        add ryeWhisky
        add bitters
        add absinthe
        shake
        strainInto glass
        add lemonGarnish

    main = serve $ makeCocktail sazerac
Re:Why Clojure? (2010) by dllthomas on Friday December 30, 2016 @04:25PM (#13287598)
Haskell really is a pretty nice imperative language sometimes.