Skip to content

Instantly share code, notes, and snippets.

View iancanderson's full-sized avatar
😄
things!

Ian C. Anderson iancanderson

😄
things!
View GitHub Profile
@iancanderson
iancanderson / Beer.hs
Created April 1, 2016 18:19 — forked from MattMSumner/Beer.hs
make it werrkkkk
data Hop = Hop {name :: String, alphaAcid :: Double} deriving (Show)
type BoilTime = Double
type Ounces = Double
data HopAddition = HopAddition Hop Ounces BoilTime deriving (Show)
data HomebrewRecipe = HomebrewRecipe [HopAddition] deriving (Show)
-- http://www.realbeer.com/hops/FAQ.html#units
recipeIbus :: HomebrewRecipe -> Double
recipeIbus (HomebrewRecipe as) = sum $ map ibus as
# 2011-03-22
#
# Mac OS X 10.6.3
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.8.7, 1.9.2
# Passenger 2.2.15
# MySQL 5.1.49