Last active
March 6, 2017 09:37
-
-
Save jaimeiniesta/0b00e2b86133aa4f109aa7616a04065c to your computer and use it in GitHub Desktop.
Failed erlang example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(exercise). | |
-export([howManyEqual/2, howManyEqual/3]). | |
howManyEqual(X,X) -> | |
2; | |
howManyEqual(_X,_Y) -> | |
0. | |
howManyEqual(X,Y,Z) -> | |
howManyEqual(X,Y) + howManyEqual(Y,Z). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment