Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Functional Programming
diff options
context:
space:
mode:
1 files changed, 1 insertions, 1 deletions
-rw-r--r--Year 2/Functional Programming/hw3.hs2
diff --git a/Year 2/Functional Programming/hw3.hs b/Year 2/Functional Programming/hw3.hs
index 6fc19b2..f05dcb9 100644
--- a/Year 2/Functional Programming/hw3.hs
+++ b/Year 2/Functional Programming/hw3.hs
@@ -4,7 +4,7 @@ generate :: [Int] -> [Int] -> [[Int]]
generate as bs = [x : take (takelen - skiplen) (drop skiplen alx) | x <- as,
let alx = tail (alterconif x as bs []),
takelen <- [1,3..(length alx)],
- skiplen <- 0 : [takelen - 1 | takelen > 1]]
+ skiplen <- [0,2..(takelen - 1)]]
where
alterconif :: Int -> [Int] -> [Int] -> [Int] -> [Int]
alterconif cn a [] accum = accum