These code are programmed by me during studying erlang.