fork download
  1. -module(prog).
  2. -export([main/0]).
  3.  
  4. same(X,X) ->
  5. true;
  6. same(_,_) ->
  7. false.
  8.  
  9. main() ->
  10. io:format("~p ~p ~p~n", [a, a, same(a, a)]),
  11. io:format("~p ~p ~p~n", [a, b, same(a, b)]),
  12. io:format("~p ~p ~p~n", [{1,{2,{3}}}, {1,{2,{3}}},
  13. same({1,{2,{3}}},{1,{2,{3}}})]),
  14. io:format("~p ~p ~p~n", [{1,{2,{3}}}, {1,{2,{4}}},
  15. same({1,{2,{3}}},{1,{2,{4}}})]),
  16. true.
Success #stdin #stdout 0.07s 23464KB
stdin
Standard input is empty
stdout
a a true
a b false
{1,{2,{3}}} {1,{2,{3}}} true
{1,{2,{3}}} {1,{2,{4}}} false