HW 5

44 views
Skip to first unread message

michalkry...@gmail.com

unread,
Dec 14, 2017, 2:45:27 AM12/14/17
to Haskell-FER
In task 3,
if :                                  splitter " > " "123 > "  give us ["123", ""],
then :                             splitter "" "abcde" => ["a", "b", "c", "d", "e"]
shouldn't look like this : splitter "" "abcde" => ["a", "b", "c", "d", "e", ""]?

Luka Hadžiegrić

unread,
Dec 14, 2017, 4:21:49 AM12/14/17
to Haskell-FER
No, because in the first example you have "123 > " with " > " at the end which is a sub list that we are splitting on so naturally, you would split the list on anything before and after " > ".

Also, it seems that I somehow forgot to add note to the problem text that you don't have to implement splitting on an empty list e.g. "", you have to cover minimum of one element in a list e.g. ">" or more "longsplitstring..." (of course feel free to implement everything :).

Luka Hadžiegrić

unread,
Dec 14, 2017, 4:26:26 AM12/14/17
to Haskell-FER
Actually, I did put a note that you don't have to implement splitting on empty lists, I've checked it right now :)


On Thursday, December 14, 2017 at 8:45:27 AM UTC+1, michalkry...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages