Skip to content

Instantly share code, notes, and snippets.

View cmoore's full-sized avatar
🆑

Clint Moore cmoore

🆑
View GitHub Profile
fib :: ( Num t, Num t1 ) => t -> t1
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
cnl_clink :: (Num t, Num a, Ord a) => t -> [a]
cnl_clink x = let lx = fib x
in
if lx > 4000000 then
[]
p1 :: Int
p1 = sum $ nub $
filter (\x -> x `mod` 3 == 0) [1..999] ++
filter (\x -> x `mod` 5 == 0) [ 1..999 ]
module Euler where
import List
import Control.Parallel
import Char
is_by_5 x = x `mod` 5 == 0
is_by_3 x = x `mod` 3 == 0
module Network.SunlightLabs.Legislators where
import Network.SunlightLabs.Utils
import Network.SunlightLabs.JSON
import Control.Monad
import Data.Maybe
import Network.HTTP
import qualified Data.Map as M