From: Francis Russell Date: Mon, 7 Jan 2013 18:02:45 +0000 (+0000) Subject: Fix bug in mergeContiguous. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=85d8c4b7943abfd5b5fe463bea6b7a5352b10ca7;p=francis%2Fofc.git Fix bug in mergeContiguous. --- diff --git a/OFC/Spectral.hs b/OFC/Spectral.hs index 972d43a..bfac594 100644 --- a/OFC/Spectral.hs +++ b/OFC/Spectral.hs @@ -197,7 +197,7 @@ mergeOverlaps = mergeContiguous . sort . splitOverlaps where mergeContiguous ((Band l1 h1):(Band l2 h2):bs) = if h1==l2 then (Band l1 h2):(mergeContiguous bs) - else (Band l1 h2):(Band l2 h2):(mergeContiguous bs) + else (Band l1 h1):(Band l2 h2):(mergeContiguous bs) mergeContiguous bs = bs splitOverlaps :: [Band] -> [Band]