Anton Shestakov <engored@ya.ru>, Sun, 02 Mar 2014 22:41:13 +0900
Dedicated service: rps_nickserv.
src/rps3.erl
Permissions: -rw-r--r--
-export([get_rules/0, winning_hand/1]). get_rules() -> [rock, paper, scissors]. beats(H, lists:reverse(get_rules())). % rock, rock, rock -> rock % rock, paper, scissors -> undefined % rock, paper, paper -> paper % rock, rock, paper -> paper HSet = sets:from_list(Hands), case sets:is_element(loses(Hand), HSet) of