Skip to content

Commit 938ac5e

Browse files
committed
[fix] Exercises05 comments fix
1 parent d50dfab commit 938ac5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

HaskellExercises05/src/Exercises05.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ macid = "TODO"
2929
-----------------------------------------------------------------------------------------------------------
3030
-- Implement the function split that takes a list and splits it in half and returns a tuple of the
3131
-- two halves, WITHOUT USING TAKE / DROP
32-
-- NOTE when the list is uneven, the first list is one element larger than the second
32+
-- NOTE when the list is uneven, the second list is one element larger than the first
3333
-- NOTE^2 when using take / drop, although convenient, you introduce redundant computation. A more
3434
-- efficient implementation of this function can be done calling an auxilary function with
3535
-- different parameters that recurses through the list directly
@@ -62,7 +62,7 @@ mergeSort xs = error "TODO implement mergeSort"
6262

6363
-- Exercise D
6464
-----------------------------------------------------------------------------------------------------------
65-
-- Implement the function isSorted that tests if a list is sorted or not
65+
-- Implement the function sortProp that tests if a list is sorted or not
6666
-- NOTE you can use this with QuickCheck to test your mergSort function by calling
6767
-- quickCheck (sortProp . mergeSort)
6868
-----------------------------------------------------------------------------------------------------------
@@ -71,7 +71,8 @@ sortProp xs = error "TODO implement sortProp"
7171

7272
-- Exercise E
7373
-----------------------------------------------------------------------------------------------------------
74-
-- Implement the Prelude function isSorted that tests if a list is sorted or not
74+
-- Implement the Prelude function replicate that takes an Int n and a element and returns a list that
75+
-- replicates that element n times
7576
-----------------------------------------------------------------------------------------------------------
7677
replicate :: Int -> a -> [a]
7778
replicate n x = error "TODO implement replicate"

0 commit comments

Comments
 (0)