HaLeX-1.1: HaLeX enables modelling, manipulation and animation of regular languagesSource codeContentsIndex
Language.HaLex.Util
Portabilityportable
Stabilityprovisional
Maintainerjas@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]Source
List Function: l1 - l2. Unlike List.(\), this function removes duplicates as well.
limit :: Eq a => (a -> a) -> a -> aSource
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]]Source

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 2.3.0