aboutsummaryrefslogblamecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src/ets_select.erl
blob: 17bfb5c8bc7bdf4a74f7561b50860c09cd55d5f4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                     
-module(ets_select).
-export([test/0]).

test() ->
  Table = ets:new(table, [set,{keypos,1}]),
  ets:insert(Table, {foo, bar, baz}),
  foo(Table). % ets:select(Table, [{{'_', '$1', '$2'}, [], ['$$']}]).

foo(Table) ->
  Tuples = ets:select(Table, [{{'_', '$1', '$2'}, [], ['$$']}]),
  [list_to_tuple(Tuple) || Tuple <- Tuples].