
At 8:34 PM -0700 8/5/10, prad wrote:
On Thu, 5 Aug 2010 19:07:13 -0700 prad
wrote: correcting it by sticking on a delimiter doesn't seem to be the right thing to do though. so there must be another way to deal with this. hmmm.
i think i can solve the dilemma by introducing an accessory function getTail:
br [] = [] br ss = fst (tup) : br (getTail (snd tup)) where tup = break eqD ss getTail s | s==[] = [] | otherwise = tail s
it works, though i don't know if this is necessarily the best way to do it.
-- In friendship, prad
I would write something like: br [] = [] br ss = let (h, t) = break eqD ss in h : case t of [] -> [] _ : t -> br t Dean