aboutsummaryrefslogtreecommitdiff
path: root/challenge-081
diff options
context:
space:
mode:
authorMyoungjin JEON <jeongoon@gmail.com>2020-10-08 14:53:55 +1100
committerMyoungjin JEON <jeongoon@gmail.com>2020-10-08 14:53:55 +1100
commitf8c11165cbbbb01a243939998e2ffec0cfc7eb5d (patch)
tree1f1addc2077d5a835bcea03f82d61eeaddce41a3 /challenge-081
parent1f3587f831b46dd1934c95f7a2069982021da374 (diff)
downloadperlweeklychallenge-club-f8c11165cbbbb01a243939998e2ffec0cfc7eb5d.tar.gz
perlweeklychallenge-club-f8c11165cbbbb01a243939998e2ffec0cfc7eb5d.tar.bz2
perlweeklychallenge-club-f8c11165cbbbb01a243939998e2ffec0cfc7eb5d.zip
[ch-081/jeongoon] Haskell solution modified
Diffstat (limited to 'challenge-081')
-rw-r--r--challenge-081/jeongoon/haskell/ch-1.hs3
-rw-r--r--challenge-081/jeongoon/haskell/ch-2.hs2
2 files changed, 2 insertions, 3 deletions
diff --git a/challenge-081/jeongoon/haskell/ch-1.hs b/challenge-081/jeongoon/haskell/ch-1.hs
index ea32cf086f..269c0ec152 100644
--- a/challenge-081/jeongoon/haskell/ch-1.hs
+++ b/challenge-081/jeongoon/haskell/ch-1.hs
@@ -1,6 +1,5 @@
import System.Environment
import System.Exit
-import Data.List (intercalate)
--commonDivisors :: (Integral a) => [a] -> [a]
commonDivisors [] = []
@@ -26,4 +25,4 @@ main = do
strs <- getArgs
if length strs < 2
then die $ "usage: runhaskell ch-1.hs <string> <string>"
- else putStrLn $ ((intercalate " ").commonBaseStrings) strs
+ else putStrLn $ (unwords.commonBaseStrings) strs
diff --git a/challenge-081/jeongoon/haskell/ch-2.hs b/challenge-081/jeongoon/haskell/ch-2.hs
index d56022e832..cb5b8e31d6 100644
--- a/challenge-081/jeongoon/haskell/ch-2.hs
+++ b/challenge-081/jeongoon/haskell/ch-2.hs
@@ -9,7 +9,7 @@ import Data.Map.Strict (Map)
-}
{- comment:
- when using Data.Text, it becomes allmost twice faster than regular [Char]
+ when using Data.Text, it becomes almost twice faster than regular [Char]
complie with: ghc -O2 ch-2
tested with ./ch-2