
16 Jan
2008
16 Jan
'08
7:10 p.m.
Ian Lynagh wrote:
One or the other should be changed so that these agree:
*Main> split 'a' "" [""] *Main> Data.ByteString.Char8.split 'a' (Data.ByteString.Char8.pack "") Loading package array-0.1.0.0 ... linking ... done. Loading package bytestring-0.9.0.1 ... linking ... done. []
although I couldn't say which is "right" OTTOMH...
I hadn't noticed. In my opinion the Data.List version is more consistent,
split 'a' "xx" == ["xx"] split 'a' "x" == ["x"] split 'a' "" == [""]
and
split 'a' "aa" == ["","",""] split 'a' "a" == ["",""] split 'a' "" == [""]
Versus:
B.split 'a' "xx" == ["xx"] B.split 'a' "x" == ["x"] B.split 'a' "" == [] B.split 'a' "aa" == ["","",""] B.split 'a' "a" == ["",""] B.split 'a' "" == []
Twan