Changes in / [6f71276:7444113]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/generic_types.tex

    r6f71276 r7444113  
    214214Hence, programmers can easily form new local environments to maximize reuse of existing functions and types.
    215215
    216 Finally, \CFA allows variable overloading:
     216Finally, variables may be overloaded:
    217217\lstDeleteShortInline@
    218218\par\smallskip
     
    263263forall( otype T | summable( T ) )
    264264  T sum( T a[$\,$], size_t size ) {
    265         `T` total = { `0` };                                    $\C{// instantiate T from 0}$
     265        T total = { 0 };                                                $\C{// instantiate T from 0}$
    266266        for ( unsigned int i = 0; i < size; i += 1 )
    267                 total `+=` a[i];                                        $\C{// select appropriate +}$
     267                total += a[i];                                          $\C{// select appropriate +}$
    268268        return total;
    269269}
Note: See TracChangeset for help on using the changeset viewer.