Closed
Description
In the canonical-data.json
for the list-ops
exercise test case 2 and 3 have descriptions that are conflicting, given the associated inputs.
In the append entries to a list and return the new list
cases:
- Test case 2: "empty list to list" expects
list1
input to be appended tolist2
input - Test case 3: "non-empty lists" expects
list2
input to be appended tolist1
input
(This is based on the description and the ordering of the values in the expected output..)
Any given implementation can only either append or prepend, but not arbitrarily chose one of append or prepend. Given the name of the cases relates to appending, I understand that append is what was intended, but this is not what these test cases imply.
Additional notes on reading the spec by someone who doesn't know functional operations:
- In the foldl and foldr test cases it seems ambiguous as to which argument in the function is to be used for the initial value, i.e. is the value from the list
x
ory
? This makes understanding the division operations harder than it should be. - when concatenating a list of nested lists is it intended that the empty list is not removed completely as it was in the list of lists? I guess the implication is that it is a "shallow" operation?
Metadata
Metadata
Assignees
Labels
No labels