From 62cfdbaaf968544d02530af28cd4a3564b3eaf74 Mon Sep 17 00:00:00 2001 From: k0dev <108899333+k0dev@users.noreply.github.com> Date: Tue, 15 Nov 2022 17:42:20 +0100 Subject: [PATCH] simple function example --- code/function_example.erl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 code/function_example.erl diff --git a/code/function_example.erl b/code/function_example.erl new file mode 100644 index 0000000..ce4be2c --- /dev/null +++ b/code/function_example.erl @@ -0,0 +1,8 @@ +-module(function_example). +-export([f/1]). + +f(2) -> "two"; +f(1) -> "one"; +f(0) -> "zero"; +f(3) -> "three"; +f(_) -> "unknown number".