From 5a9cdd3cc89507d4d74f8bded56ce5e037b3b56e Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 23 Feb 2024 07:08:18 +0100 Subject: wip --- learn-you-some-erlang/useless.erl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 learn-you-some-erlang/useless.erl (limited to 'learn-you-some-erlang/useless.erl') diff --git a/learn-you-some-erlang/useless.erl b/learn-you-some-erlang/useless.erl new file mode 100644 index 0000000..d5542a2 --- /dev/null +++ b/learn-you-some-erlang/useless.erl @@ -0,0 +1,14 @@ +-module(useless). +-export([add/2, hello/0, greet_and_add_two/1]). + +add(A,B) -> + A + B. + +%% Shows greetings. +%% io:format/1 is the standard function used to output text. +hello() -> + io:format("Hello, world!~n"). + +greet_and_add_two(X) -> + hello(), + add(X,2). -- cgit v1.2.3