Skip to content

Instantly share code, notes, and snippets.

@oskwazir
Created July 27, 2015 03:07
Show Gist options
  • Select an option

  • Save oskwazir/1e9af59b3a0a6399f372 to your computer and use it in GitHub Desktop.

Select an option

Save oskwazir/1e9af59b3a0a6399f372 to your computer and use it in GitHub Desktop.
Useless module from http://learnyousomeerlang.com
-module(useless).
-export([add/2, hello/0, greet_and_add_two/1]).
add(A,B) ->
A + B.
%% Show greetings.
%% io:format/1 is the standard function use to output text.
hello() ->
io:format("Hello, world!~n").
greet_and_add_two(X) ->
hello(),
add(X,2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment