Changes in / [a357b4c:bbc9b64]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/generic_types.tex

    ra357b4c rbbc9b64  
    222222Hence, programmers can easily form new local environments to maximize reuse of existing functions and types.
    223223
    224 Finally, variables may be overloaded:
     224Finally, \CFA allows variable overloading:
    225225\lstDeleteShortInline@
    226226\par\smallskip
     
    271271forall( otype T | summable( T ) )
    272272  T sum( T a[$\,$], size_t size ) {
    273         T total = { 0 };                                                $\C{// instantiate T from 0}$
     273        `T` total = { `0` };                                    $\C{// instantiate T from 0}$
    274274        for ( unsigned int i = 0; i < size; i += 1 )
    275                 total += a[i];                                          $\C{// select appropriate +}$
     275                total `+=` a[i];                                        $\C{// select appropriate +}$
    276276        return total;
    277277}
Note: See TracChangeset for help on using the changeset viewer.