Diff for /doc/homework/homework5.html between versions 1.6 and 1.7

version 1.6, 2001/06/13 19:53:03 version 1.7, 2001/06/14 21:26:06
Line 524 Line 524
   
     <tr>      <tr>
              <td valign="top">map(seed;a,b,c,d;w,x,y,z)</td>               <td valign="top">map(seed;a,b,c,d;w,x,y,z)</td>
              <td valign="top">Option 1 - &amp;map($seed,[\$w,\$x,\$y,\$z],\@a) or <br>                <td valign="top">Option 1 - &amp;map($seed,[\$w,\$x,\$y,\$z],[$a,$b,$c,$d]) or <br> 
                   Option 2 - &amp;map($seed,\@a,[$w,$x,$y,$z]) <br>                    Option 2 - &amp;map($seed,\@mappedArray,[$a,$b,$c,$d]) <br>
                   where @a=('A','B','C','D') <br>                    Option 3 - @mappedArray = &amp;map($seed,[$a,$b,$c,$d]) <br>
                         $w='W'<br>                    Option 4 - ($w,$x,$y,$z) = &amp;map($seed,\@a) <br>
                         $x='X'<br>                    where $a='A'<br>
                         $y='Y'<br>                          $b='B'<br>
                         $z='Z'</td>                          $c='B'<br>
                           $d='B'<br>
                           $w, $x, $y, and $z are variables</td>
              <td valign="top">Assigns to the variables $w, $x, $y and $z the values of the               <td valign="top">Assigns to the variables $w, $x, $y and $z the values of the
                   variables A, B, C and D depending on the seed. (Option 1 of calling map).                     $a, $b, $c and $c (A, B, C and D). The precise value for $w .. depends
                   In option 2, the values of $w, $x .. are mapped into the array @a. The two                    on the seed. (Option 1 of calling map). 
                   options illustrate the different grouping.</td>                    In option 2, the values of $a, $b .. are mapped into the array, @mappedArray. The two
                     options illustrate the different grouping. Options 3 and 4 give a consistent 
                     way (with other functions) of mapping the items. For each option, the group can
                     be passed as an array, for example, [$a,$b,$c,$d] => \@a.</td>
              <td valign="top">In CAPA, the arguments are divided into three groups separated               <td valign="top">In CAPA, the arguments are divided into three groups separated
                   by a semicolon ;. In LON-CAPA, the separation is done by using [] brackets or                    by a semicolon ;. In LON-CAPA, the separation is done by using [] brackets or
                   using an array @a. Note the backslash (\) before the arguments in the                    using an array @a. Note the backslash (\) before the arguments in the
Line 544 Line 549
   
     <tr>      <tr>
              <td valign="top">rmap(seed;a,b,c,d;w,x,y,z)</td>               <td valign="top">rmap(seed;a,b,c,d;w,x,y,z)</td>
              <td valign="top">&amp;rmap($seed,[\$w,\$x,\$y,\$z],\@a) or <br>                <td valign="top">Option 1 - &amp;rmap($seed,[\$w,\$x,\$y,\$z],[$a,$b,$c,$d]) or <br> 
                   &amp;rmap($seed,\@a,[$w,$x,$y,$z]) <br>                    Option 2 - &amp;rmap($seed,\@rmappedArray,[$a,$b,$c,$d]) <br>
                   where @a=('A','B','C','D') <br>                    Option 3 - @rmapped_array = &amp;rmap($seed,[$a,$b,$c,$d]) <br>
                         $w='W'<br>                    Option 4 - ($w,$x,$y,$z) = &amp;rmap($seed,\@a) <br>
                         $x='X'<br>                    where $a='A'<br>
                         $y='Y'<br>                          $b='B'<br>
                         $z='Z'</td>                          $c='B'<br>
                           $d='B'<br>
                           $w, $x, $y, and $z are variables</td>
              <td valign="top">The rmap functions does the reverse action of map if the same seed               <td valign="top">The rmap functions does the reverse action of map if the same seed
                   is used in calling map and rmap. </td>                    is used in calling map and rmap. </td>
              <td valign="top">In CAPA, the arguments are divided into three groups separated               <td valign="top">In CAPA, the arguments are divided into three groups separated

Removed from v.1.6  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>