Dark Agent
Expert Member
- Joined
- Nov 30, 2008
- Messages
- 2,370
- Reaction score
- 274
Morning,
I battling for 2 hours and over. I want to create a module with 2 functions and 2 function overloaded.
The following works for one function
This not working
I get the following errors.
I tried tricks like export separate but more errors.
Thanks in advance
I battling for 2 hours and over. I want to create a module with 2 functions and 2 function overloaded.
The following works for one function
Code:
-module(boolean).
-export([b_not/1]).
b_not(true) -> false;
b_not(false) -> true.
This not working
Code:
-module(boolean).
-export([b_and/1,b_and/2,b_not/1]).
b_not(true) -> false;
b_not(false) -> true;
b_and(true,true) -> true;
b_and(Other) -> false.
I get the following errors.
Any clue how to approach it or fix it.boolean.erl:6: head mismatch
boolean.erl:2: function b_and/1 undefined
boolean.erl:2: function b_and/2 undefined
boolean.erl:2: function b_not/1 undefined
I tried tricks like export separate but more errors.
Thanks in advance