Aleph-w  1.9
General library for algorithms and data structures
Programación funcional

Classes

class  DynList
 Recorre condicionalmente el contenedor y ejecuta una operation mientras ésta retorne true. More...
 

Functions

template<class Container >
Aleph::DynList< typename Container::value_type > extract_from_stl_container (const Container &c)
 
template<typename T = int, template< typename > class Container = DynList>
Container< T > Aleph::range (const T n)
 
template<typename T = int>
DynList< T > Aleph::rep (size_t n, const T &item)
 
template<typename T = int, template< typename > class Container = DynList>
Container< T > Aleph::Aleph::range (const T n)
 
template<typename T = int>
DynList< T > Aleph::Aleph::rep (size_t n, const T &item)
 

Detailed Description

Programación funcional

$\aleph_\omega$ Aleph-w exporta primitivas de programación funcional. Las rutinas están inspiradas del estándar de la biblioteca general de ML; concretamente las funciones que atañen a listas.

Puesto que los contenedores de $\aleph_\omega$ Aleph-w poseen iteradores para inspeccionar todos sus elementos, el soporte de programación funcional es extendido para todos los contenedores.

Hay dos formas en que $\aleph_\omega$ Aleph-w soporta programación funcional:

Function Documentation

◆ extract_from_stl_container()

template<class Container >
Aleph::DynList<typename Container::value_type> extract_from_stl_container ( const Container &  c)
inline

Extract all the item of stl container ans save them in a DynList

+ Here is the call graph for this function:

◆ range() [1/2]

template<typename T = int, template< typename > class Container = DynList>
Container<T> Aleph::range ( const T  n)
inline

Return a range 0, 1, ... n - 1

Parameters
[in]nsize of range
Returns
a container with the range (according to the template parameter, which is DynList

◆ range() [2/2]

template<typename T = int, template< typename > class Container = DynList>
Container<T> Aleph::Aleph::range ( const T  n)
inline

Return a range 0, 1, ... n - 1

Parameters
[in]nsize of range
Returns
a container with the range (according to the template parameter, which is DynList

◆ rep() [1/2]

template<typename T = int>
DynList<T> Aleph::rep ( size_t  n,
const T &  item 
)
inline

Create a sequence of repeated items

Parameters
[in]nnumber of items
[in]itemthe valur to be repeated
Returns
a container with n instances of item value
+ Here is the call graph for this function:

◆ rep() [2/2]

template<typename T = int>
DynList<T> Aleph::Aleph::rep ( size_t  n,
const T &  item 
)
inline

Create a sequence of repeated items

Parameters
[in]nnumber of items
[in]itemthe valur to be repeated
Returns
a container with n instances of item value

Leandro Rabindranath León