aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/test/syntax_tools_SUITE_data/m2.erl
blob: 781139317d49819bf4f81c9acfca927923adced2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%%
%% File:    m2.erl
%% Author:  Björn-Egil Dahlberg
%% Created: 2014-10-24
%%

-module(m2).


-export([foo/0,foo/1,foo/2,
	 bar/0,bar/1,bar/2,
	 record_update/2, record/0]).

foo() -> ok.
foo(A) -> [item,A].
foo(A,B) -> A + B.

bar() -> true.
bar(A) -> {element,A}.
bar(A,B) -> A*B.

-record(rec, {a,b}).

record() -> #rec{a=3,b=0}.
record_update(V,#rec{a=V0}=R) ->
    R#rec{a=V0+V,b=V0}.