Skip to content

Instantly share code, notes, and snippets.

View nbouscal's full-sized avatar

Naia Bouscal nbouscal

View GitHub Profile
@nbouscal
nbouscal / keybase.md
Created August 14, 2016 23:54
keybase.md

Keybase proof

I hereby claim:

  • I am nbouscal on github.
  • I am nbouscal (https://keybase.io/nbouscal) on keybase.
  • I have a public key ASDm3ceXVuwLLxsGUWVc-mRjVqaezUZAqoaimgThCM5yUQo

To claim this, I am signing this object:

@nbouscal
nbouscal / gist:ae736fd51e8fe71df0f8
Created June 9, 2015 15:00
org proportion of expense
proportionOfExpense = do
split <- getSupportedOrgSplit
centralExpense <- forOrg central getOrgSubtotalExpense
let shareOfCentral = split * centralExpense
totalExpense <- getSupportedOrgTotalExpense
let proportion = shareOfCentral / totalExpense
return proportion
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
import Control.Arrow
import Data.Monoid
type FizzBuzz = Either String Int
showFB :: FizzBuzz -> String
showFB (Left x) = x
showFB (Right x) = show x