I'm having trouble getting this started, as in, I'm not sure what is exactly happening with this function. What it's supposed to do is take in 2 parameters, a character, and a string, then output a list of strings that are separated by that character.
For example,
break ',' "abc,def,ghi"
should output ["abc","def","ghi"]
I am given the code, and I'm supposed to fill in the "?"s
break ? [] = ?
break n xs = brk n xs ?
where
brk n xs acc
| xs == [] = ?
| n == ? xs = ? ++ break n (? xs)
| ? = brk n (? xs) (acc ++ ?)
I'm not sure how to approach this or how the acc helps with this problem. The only idea I have is that the first line should be
break _ [] = []
If anyone can help me get started with this problem, that would be great! Thanks!