Logic operators implementation in erlang