All pastes #709668 Raw Edit

Mine

public text v1 · immutable
#709668 ·published 2007-09-24 21:22 UTC
rendered paste body
  18 overlap :: ([a], [a], [a]) -> ([a], [a], [a])
  19 overlap (as, bs, cs) =
  20     if bs == take (length bs) cs then (as, bs, (drop (length bs) cs))
  21     else if (length bs) > 1 then overlap (as:[head bs]) (tail bs) cs
  22     else ([], [], [])