From 709c5ed53f282693f1731aff8f0c8080dde872dc Mon Sep 17 00:00:00 2001 From: Sasan Hezarkhani Date: Thu, 24 Aug 2017 13:18:34 +0100 Subject: Changes confusing example of a bad guard in ets:fun2ms --- lib/stdlib/doc/src/ets.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml index f6f3d18d6a..95af2b77a5 100644 --- a/lib/stdlib/doc/src/ets.xml +++ b/lib/stdlib/doc/src/ets.xml @@ -408,9 +408,9 @@ calls cannot be in the guard or body of the fun. Calls to built-in match specification functions is of course allowed:

-4> ets:fun2ms(fun({M,N}) when N > X, is_atomm(M) -> M end).
+4> ets:fun2ms(fun({M,N}) when N > X, my_fun(M) -> M end).
 Error: fun containing local Erlang function calls
-('is_atomm' called in guard) cannot be translated into match_spec
+('my_fun' called in guard) cannot be translated into match_spec
 {error,transform_error}
 5> ets:fun2ms(fun({M,N}) when N > X, is_atom(M) -> M end).
 [{{'$1','$2'},[{'>','$2',{const,3}},{is_atom,'$1'}],['$1']}]
-- cgit v1.2.3