This library provides functions to categorize a list of entities into a HTML page with an index access (e.g., "A-Z") to these entities.
list2CategorizedHtml
:: (HTML b, Show c) => [(a, [b])] -> [(c, String)] -> (a -> c -> Bool) -> [b]
General categorization of a list of entries.
The item will occur in every category for which the boolean function categoryFun yields True.
:: (HTML b, Show c)
|
|
=> [(a, [h])]
|
the list of key-item pairs which are supposed to be categorized with respect to key |
-> [(b, String)]
|
list of key-category pairs to which the items can be sorted in |
-> a -> b -> Bool
|
uses the keys of the items and the keys of the categories to distribute the items among the categories |
-> [h]
|
HTML containing inner links between the categories |
categorizeByItemKey
:: HTML a => [(String, [a])] -> [a]
Categorizes a list of entries with respect to the initial keys.
The categories are named as all initial characters of the keys of the items.
:: HTML a
|
|
=> [(String, [h])]
|
the list of key-item pairs which are supposed to be categorized with respect to key |
-> [h]
|
HTML containing inner links between the categories |
stringList2ItemList
:: HTML a => [String] -> [(String, [a])]
Converts a string list into an key-item list. The strings are used as keys and for the simple text layout.