Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
elm::imm Namespace Reference

Classes

class  list
 
class  sorted_list
 

Functions

template<class T >
list< T > cons (const T &h, list< T > t)
 
template<class T >
list< T > operator+ (const T &h, list< T > t)
 
template<class T >
list< T > operator+ (list< T > l1, list< T > l2)
 
template<class T >
list< T > make (T a[], int n)
 
template<class T >
io::Outputoperator<< (io::Output &out, list< T > l)
 

Function Documentation

◆ cons()

list< T > cons ( const T &  h,
list< T >  tl 
)
inline

Build a new list node with h value and prepend it to tl.

Parameters
hItem to store in the new node.
tList to preprend to.
Returns
Created list.

References list< T >::cons().

Referenced by make(), and operator+().

◆ make()

list<T> elm::imm::make ( a[],
int  n 
)
inline

References cons().

◆ operator+() [1/2]

list<T> elm::imm::operator+ ( const T &  h,
list< T >  t 
)
inline

References cons().

◆ operator+() [2/2]

list<T> elm::imm::operator+ ( list< T >  l1,
list< T >  l2 
)
inline

References list< T >::concat().

◆ operator<<()

io::Output& elm::imm::operator<< ( io::Output out,
list< T >  l 
)

References list< T >::hd(), and list< T >::tl().