aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/test/syntax_tools_SUITE_data/specs_and_funs.erl
blob: 8dfeaf5a6bd86082a059550521a84c30ab5d2af9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-module(specs_and_funs).

-export([my_apply/3, two/1]).

%% OTP-15519, ERL-815

-spec my_apply(Fun, Arg, fun((A) -> A)) -> Result when
      Fun :: fun((Arg) -> Result),
      Arg :: any(),
      Result :: any().

my_apply(Fun, Arg, _) ->
    Fun(Arg).

-spec two(fun((A) -> A)) -> fun((B) -> B).

two(F) ->
    F(fun(X) -> X end).