This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p1 :: Int | |
p1 = sum $ nub $ | |
filter (\x -> x `mod` 3 == 0) [1..999] ++ | |
filter (\x -> x `mod` 5 == 0) [ 1..999 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder