Download:
child 13:30f6287441d2
parent 11:9dd5bb0a4c0c
12:23a27ec9f362
Anton Shestakov <engored@ya.ru>, Wed, 26 Feb 2014 02:28:07 +0900
A bit more consistent naming in rps3.

1 файлов изменено, 6 вставок(+), 6 удалений(-) [+]
rps3.erl file | annotate | diff | comparison | revisions
--- a/rps3.erl Wed Feb 26 02:23:06 2014 +0900
+++ b/rps3.erl Wed Feb 26 02:28:07 2014 +0900
@@ -3,17 +3,17 @@
get_rules() -> [rock, paper, scissors].
-beats(C) ->
- beats(C, get_rules()).
+beats(H) ->
+ beats(H, get_rules()).
-beats(C, [C|Tail]) ->
+beats(H, [H|Tail]) ->
lists:last(Tail);
-beats(C, [B,C|_]) ->
+beats(H, [B,H|_]) ->
B;
-beats(C, [_|T]) ->
- beats(C, T).
+beats(H, [_|T]) ->
+ beats(H, T).
test_beats() ->
lists:foreach(