Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :| Positive
- Digit0 (Positive)
- Digit1 (Positive)
- Stop
- :| Integer
- P(Positive)
- N(Positive)
- Zero
- to_value (P pos) = to_value_pos pos
- to_value (N pos) = - (to_value_pos pos)
- to_value Zero = 0
- to_value_pos Stop = 1
- to_value_pos (Digit0 rest) = (2 * to_value_pos rest)
- to_value_pos (Digit1 rest) = (2 * to_value_pos rest) + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement