Rephrase @ operator description
This commit is contained in:
parent
d8c061e044
commit
8ea9fd7aa6
1 changed files with 3 additions and 4 deletions
|
@ -1060,15 +1060,14 @@ map (concat "foo") [ "bar" "bla" "abc" ]</programlisting>
|
||||||
and <varname>z</varname>.</para></listitem>
|
and <varname>z</varname>.</para></listitem>
|
||||||
|
|
||||||
|
|
||||||
<listitem><para>An <literal>@</literal>-pattern requires that the
|
<listitem><para>An <literal>@</literal>-pattern provides a means of referring
|
||||||
argument matches with the patterns on the left- and right-hand side
|
to the whole value being matched:
|
||||||
of the <literal>@</literal>-sign. For example:
|
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
args@{ x, y, z, ... }: z + y + x + args.a</programlisting>
|
args@{ x, y, z, ... }: z + y + x + args.a</programlisting>
|
||||||
|
|
||||||
Here <varname>args</varname> is bound to the entire argument, which
|
Here <varname>args</varname> is bound to the entire argument, which
|
||||||
is further matches against the pattern <literal>{ x, y, z,
|
is further matched against the pattern <literal>{ x, y, z,
|
||||||
... }</literal>.</para></listitem>
|
... }</literal>.</para></listitem>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue