lcs-0.2: Find longest common sublist of two lists

Portabilitynon-portable (HuntSzymanski implementation is non-portable)
Stabilityprovisional
Maintainerigloo@earth.li

Data.List.LCS

Description

Provides a function lcs that takes two lists and returns a longest common sublist. For example, lcs abcd acbd is either abd or acd.

Synopsis

Documentation

lcs :: Ord a => [a] -> [a] -> [a]Source

The lcs function takes two lists and returns a list with a longest common subsequence of the two.