- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# C:/Musimathics_local/Musimat/include/List.h File Reference

The basic List class template. More...

`#include <assert.h>`
`#include <memory.h>`
`#include <iostream>`

Go to the source code of this file.

## Classes
class | List< Type >
| The List class template is used to construct lists of all types, Integer, Real, Complex, Pitch, Rhythm, etc. More...
## Functions
template<class Type>
Integer | Length (Type &L)
| Return the length of a list.
template<class Type>
Type | Join (Type &L1, Type &L2)
| Join 2 Lists.
template<class Type>
Type | Join (Type &L1, Type &L2, Type &L3)
| Join 3 Lists.
template<class Type>
Type | Join (Type &L1, Type &L2, Type &L3, Type &L4)
| Join 4 Lists.
template<class Type>
Type | Join (Type &L1, Type &L2, Type &L3, Type &L4, Type &L5)
| Join 5 Lists.
template<class Type>
Type | Join (Type &L1, Type &L2, Type &L3, Type &L4, Type &L5, Type &L6)
| Join 6 Lists.
template<class Type>
Type | Join (Type &L1, Type &L2, Type &L3, Type &L4, Type &L5, Type &L6, Type &L7)
| Join 7 Lists.
template<class TargetListType, class ElementType, class ListType>
TargetListType | Map (ListType L, ElementType(*fn)(ElementType))
| Map -- Apply function to all elements of a list.

## Detailed Description

The basic List class template.

Definition in file List.h.

## Function Documentation

template<class Type>

Integer Length | ( | Type & | L | ) | `[inline]`

Return the length of a list.

Definition at line 564 of file List.h.

References Return.

    00564 { Return( L.length() ); }

template<class TargetListType, class ElementType, class ListType>

TargetListType Map | ( | ListType | L,
|  | ElementType(*)(ElementType) | fn |
| ) |  |  |

Map -- Apply function to all elements of a list.

Definition at line 593 of file List.h.

References For, Length(), and Return.

    00594 {
    00595         For( Integer i = 0; i < Length( L ); i++ )
    00596                 L[i] = fn( L[i] );
    00597         Return( L );
    00598 }