Why is there no splitBy in the list module?

Christian Maeder maeder at tzi.de
Wed Jul 12 11:07:58 EDT 2006


Malcolm Wallace schrieb:
> Christian Maeder <maeder at tzi.de> wrote:
>
>> splitFields 'a' "baaba" -> ["b", "", "b", ""]
>> splitLines  'a' "baaba" -> ["b", "", "b"]
>> splitWords  'a' "baaba" -> ["b", "b"]
> 
> Did you mean this?
> 
>   splitFields 'a' "baaba" -> ["b", "", "", "b", ""]
>   splitLines  'a' "baaba" -> ["b", "", "", "b"]
>   splitWords  'a' "baaba" -> ["b", "b"]

no!

lines = splitLines '\n'

*Main> lines "b\n\nb\n"
["b","","b"]


More information about the Libraries mailing list