[PATCH] lists: fix foreach/2's documented spec

Tuncer Ayaz tuncer.ayaz@REDACTED
Sun Oct 10 19:01:25 CEST 2010


On Sun, Oct 10, 2010 at 6:20 PM, Tuncer Ayaz wrote:
> ---
>  lib/stdlib/doc/src/lists.xml |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
> index 92c4eb4..ac19a0d 100644
> --- a/lib/stdlib/doc/src/lists.xml
> +++ b/lib/stdlib/doc/src/lists.xml
> @@ -297,10 +297,10 @@ flatmap(Fun, List1) ->
>       </desc>
>     </func>
>     <func>
> -      <name>foreach(Fun, List) -> void()</name>
> +      <name>foreach(Fun, List) -> ok</name>
>       <fsummary>Apply a function to each element of a list</fsummary>
>       <type>
> -        <v>Fun = fun(Elem) -> void()</v>
> +        <v>Fun = fun(Elem) -> _</v>
>         <v> Elem = term()</v>
>         <v>List = [term()]</v>
>       </type>
>

Please ignore this patch. I will mail a corrected patch in a minute.
Thanks to Kostis for noticing that it should be term() and not _.


More information about the erlang-patches mailing list