Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Digit is a digit in base 10, in other words an Int in [0..9] type Digit - Int Number is a list of digits representing
Digit is a digit in base 10, in other words an Int in [0..9] type Digit - Int Number is a list of digits representing a positive integer the list will be in reverse (i.e., form lower order to higher order digit) the list will not have leading zeroes -1 type Number [Diait addb takes 3 arguments 1. A positive integer, represented as a list of digits, in reverse (In other words, it goes from lowest order digit to highest order digit, and not containing any leading zeroes) 2. Another positive integer, represented as a list of digits, in reverse 3. A carry, which will always be 0 or 1 addb returns the result of adding the two positive integers plus the carry Example: addb [5,7] [9,8] 0 -1 addb :: Number -> Number -> Digit -> Number Fill in your code here addb xs ys c Digit is a digit in base 10, in other words an Int in [0..9] type Digit - Int Number is a list of digits representing a positive integer the list will be in reverse (i.e., form lower order to higher order digit) the list will not have leading zeroes -1 type Number [Diait addb takes 3 arguments 1. A positive integer, represented as a list of digits, in reverse (In other words, it goes from lowest order digit to highest order digit, and not containing any leading zeroes) 2. Another positive integer, represented as a list of digits, in reverse 3. A carry, which will always be 0 or 1 addb returns the result of adding the two positive integers plus the carry Example: addb [5,7] [9,8] 0 -1 addb :: Number -> Number -> Digit -> Number Fill in your code here addb xs ys c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started