aboutsummaryrefslogtreecommitdiff
path: root/challenge-030/stuart-little/haskell
diff options
context:
space:
mode:
authorchirvasitua <stuart-little@users.noreply.github.com>2021-01-12 18:18:29 -0500
committerchirvasitua <stuart-little@users.noreply.github.com>2021-01-12 18:18:29 -0500
commit26e97ac94644e4dfdd7420259b054fed20d4cdbb (patch)
treedf80188e5b984ad79ea752850931978bbeec51b6 /challenge-030/stuart-little/haskell
parent4189e0d8c2ea360cd3528920ad992735b2437bce (diff)
downloadperlweeklychallenge-club-26e97ac94644e4dfdd7420259b054fed20d4cdbb.tar.gz
perlweeklychallenge-club-26e97ac94644e4dfdd7420259b054fed20d4cdbb.tar.bz2
perlweeklychallenge-club-26e97ac94644e4dfdd7420259b054fed20d4cdbb.zip
1st commit on 030,068_haskell
Diffstat (limited to 'challenge-030/stuart-little/haskell')
-rwxr-xr-xchallenge-030/stuart-little/haskell/ch-1.hs9
-rwxr-xr-xchallenge-030/stuart-little/haskell/ch-2.hs8
2 files changed, 17 insertions, 0 deletions
diff --git a/challenge-030/stuart-little/haskell/ch-1.hs b/challenge-030/stuart-little/haskell/ch-1.hs
new file mode 100755
index 0000000000..262938f8ad
--- /dev/null
+++ b/challenge-030/stuart-little/haskell/ch-1.hs
@@ -0,0 +1,9 @@
+#!/usr/bin/env runghc
+
+-- run <script>
+
+import System.Environment (getArgs,)
+import Data.Time.Calendar (dayOfWeek,fromGregorian,DayOfWeek( Sunday ),)
+
+main = do
+ mapM_ print $ filter (\d -> Sunday == (dayOfWeek d)) $ map (\y -> fromGregorian y 12 25) [2019..2100]
diff --git a/challenge-030/stuart-little/haskell/ch-2.hs b/challenge-030/stuart-little/haskell/ch-2.hs
new file mode 100755
index 0000000000..3c7fd77178
--- /dev/null
+++ b/challenge-030/stuart-little/haskell/ch-2.hs
@@ -0,0 +1,8 @@
+#!/usr/bin/env runghc
+
+-- run <script>
+
+import System.Environment (getArgs,)
+
+main = do
+ mapM_ print [(x,y,12-x-y) | x <- [1..10], y <- [1..10], x + y < 12]