From 97b86f1d3f23c32902322b4bac67282db02fcc26 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 31 Mar 2011 14:52:13 -0700 Subject: [PATCH] Haskerl for e1 and running instructions --- e1.hs | 6 ++++++ erlang.txt | 3 +++ haskell.txt | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 e1.hs create mode 100644 erlang.txt create mode 100644 haskell.txt diff --git a/e1.hs b/e1.hs new file mode 100644 index 0000000..b533c64 --- /dev/null +++ b/e1.hs @@ -0,0 +1,6 @@ +divisors_3_5 [] acc = acc +divisors_3_5 (x:xs) acc + | rem x 3 == 0 || rem x 5 == 0 = divisors_3_5 xs (x:acc) + | otherwise = divisors_3_5 xs acc + +e1 = sum (divisors_3_5 [1 .. 999] []) diff --git a/erlang.txt b/erlang.txt new file mode 100644 index 0000000..d6a0c59 --- /dev/null +++ b/erlang.txt @@ -0,0 +1,3 @@ +erl +c(filename) +module:function diff --git a/haskell.txt b/haskell.txt new file mode 100644 index 0000000..f7efb72 --- /dev/null +++ b/haskell.txt @@ -0,0 +1,3 @@ +hugs +:load file +fn