PART
- Create an implementation of natural numbers
- Implement plus
- Implement equal
- Implement less than
- Implement greater than
- Implement minus
- Implement multiplication
- Implement mod/remainder
- Implement factorial
- Extra credit: implement number so that number (X, N) is true if X is a numeral corresponding to the decimal integer N. For example, number (s(z),1) is true and number (s(s(s(z))),2) is false.
- Extra credit: implement e_number, so that e_number(X, Y) is true if Y is a phrase in English for positive natural numbers between zero and 100, representing X. For example:
- e_number(s(s(s(z))), three) returns true
- e_number(X, twenty five) returns X = s(s(s(...(z)...)
Submit (2) working .pl files that demonstrate the cases above with code comments and test cases.
Last Revised: January 21, 2018