- or download this
*FishersExactTest> fac 6
R {numer = [2,3,4,5,6], denom = []}
...
R {numer = [2,3], denom = []}
*FishersExactTest> fac 6 `rdivide` fac 3
R {numer = [4,5,6], denom = []}
- or download this
*FishersExactTest> rpCutoff [ [5,0],
[1,4] ]
R {numer = [2,3,4,5], denom = [7,8,9,10]}
*FishersExactTest> fromRational . toRatio $ it
2.3809523809523808e-2
- or download this
module FishersExactTest (pCutoff) where
...
| x < y = let (xs', ys') = cancel xs (y:ys) in (x:xs', ys')
| otherwise = let (xs', ys') = cancel (x:xs) ys in (xs', y:ys')
cancel xs ys = (xs, ys)