XDoc Search Logo
Xdoc:
Stratego Library API Documentation
collection/list
Link to XDoc
Description: No additional information available
Modules:
bag This module contains strategies for handling bags. A bag is a set of elements where each element has an occurence number. Adding an element to a bag which already exists, will increase the occurence number for that element by one. In the current implementation, bags are represented as lists of (element,occurrence) tuples. Adding a new element is done using bag-insert.
common This module contains basic functionality for manipulating lists.
cons Lists are represented by means of the constructors Nil and Cons. They can either be written as terms with these constructors, e.g. Cons(0, Cons(1, Nil)), or using concrete list syntax: [0, 1] Stratego pretty-printers and the Stratego Shell will always prefer to display lists using the concrete syntax.
filter This module contains strategies for filtering and partitioning lists.
index This module contains strategies for working on lists using indexes. An indexed list works similarly to an array in that every element of the list is associated with in an integer index, and the first element has index 1. Adding the indices to a list is done by add-indices.
integer This module contains a collection of strategies for working with lists of integers.
lookup No additional information available
set No additional information available
sort This module contains strategies for sorting lists. qsort is the easiest strategy to use for sorting lists. Using SortL, LSort and sort-list, isort-list, you can compose your own sorting routine. Additionally, LMerge can be used with sort-list and isort-list to do list folding.
zip Zipping two lists into a list of pairs is a useful operation in many situations. There are many variants of zipping, for instance in the way lists of unequal length are treated. This module defines a collection of zip-like strategies for lists based on one underlying control scheme.