Advertisement
Guest User

Untitled

a guest
May 27th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2. parse_die(DieString) -> post_d(string:tokens(DieString, "d")).
  3.  
  4. post_d([JustDie]) -> post_d(["1"], JustDie);
  5. post_d([Count,Die]) -> post_plus([Count] ++ string_tokens(JustDie, "+")).
  6.  
  7. post_plus(Count,[Die]) -> post_plus(Count,[Die,0]);
  8. post_plus(Count,[Die,Plus]) -> {Count,Die,Plus}.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement