UMinho Haskell Libraries (2005.10.12)ContentsIndex
Language.HaLex.Util
Portability portable
Stability provisional
Maintainer jas@di.uminho.pt
Description

HaLeX Utility Functions

Code Included in the Lecture Notes on Language Processing (with a functional flavour).

Synopsis
(<->) :: Eq a => [a] -> [a] -> [a]
limit :: Eq a => (a -> a) -> a -> a
permutations :: [a] -> [[a]]
Documentation
(<->) :: Eq a => [a] -> [a] -> [a]
List Function: l1 - l2. Unlike List.(\), this function removes duplicates as well.
limit :: Eq a => (a -> a) -> a -> a
Apply a function repeatedly, until a fix point is reached, i.e. until the result of the function is the same as the argument.
permutations :: [a] -> [[a]]

Compute the permutations of a given list. For instance,

permutations [1,2,3] = [[1,2,3],[2,1,3],[2,3,1],[1,3,2],[3,1,2],[3,2,1]]

Produced by Haddock version 0.6