From f16f1a981db23a76ff2d68f76f5ef960427e00cc Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 8 Feb 2015 22:27:08 +0100 Subject: run.sh and applicative things --- foo.hs | 15 +++++++++++++++ run.sh | 1 + 2 files changed, 16 insertions(+) create mode 100755 run.sh diff --git a/foo.hs b/foo.hs index 0cdf3b6..1565904 100644 --- a/foo.hs +++ b/foo.hs @@ -19,3 +19,18 @@ data Bar = Bar Int Int deriving (Eq,Show) instance Ord Bar where (Bar _ s1) `compare` (Bar _ s2) = s1 `compare` s2 + + + + +-- Stuff with applicative + +intlist = [1, 5, 6, 8] + +func1 x = x * 2 +func2 x = x * 3 +func3 x = x * 5 + +funcs = [func1, func2, func3] + + diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..51ba550 --- /dev/null +++ b/run.sh @@ -0,0 +1 @@ +ghc -threaded -O raytracer.hs && time ./raytracer +RTS -s -- cgit v1.2.3