HaLeX-1.2.6: HaLeX enables modelling, manipulation and visualization of regular languages

Copyright(c) Joãoo Saraiva 20012002200320042005
LicenseLGPL
Maintainerjas@di.uminho.pt
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Language.HaLex.Util

Description

HaLeX Utility Functions

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

Synopsis

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 -> a Source #

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]]