4 ms·
I would probably use threading to achieve comparable readability. (def sazerac (-> (mix :ice :whiskey :bitters :absinthe) shake strain
by fnordsensei 10y ago
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.
- greydius 10y agoI 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
- dllthomas 10y agoHaskell really is a pretty nice imperative language sometimes.