Question: Please provide the elixir code 1) isAscending?/1 - This function should return true if the elements of the input list are strictly ascending, and false
Please provide the elixir code


1) isAscending?/1 - This function should return true if the elements of the input list are strictly ascending, and false otherwise. Each element must be strictly larger than (not merely equal to) the element that precedes it. Note that the empty list is ascending, as is every list containing only a single element. 2) onlyoddDigits?/1 - This function should return true if the provided integer argument contains only odd digits (1,3,5,7,9) and false otherwise. Note that the digit ' 0 ' is considered even. Hint: The functions rem/2 and div/2 will serve you well here. 3) tailfib/1 - This function accepts an integer argument, n, and returns the th Fibonacci number. Assume the first two Fibonacci numbers are 1 and 1 . That is, tailFib(1) ==1, tailFib( 2)==1. There is no tailFib(0). Your tail-recursive implementation must avoid the double recursive call. NoO(2n) ! 4) giveChange/2 - This function accepts an amount of money, and a list of coin values (in descending order). The function should return a list containing the minimum number of coins necessary to represent the money amount. The returned list should be in descending order. If it is not possible to make change for the amount with the provided list of coins, you should return the :error atom. Several examples are below. You may assume the coin values are provided such that the greedy solution will always be correct. Subtract the largest coin possible at each step. 5) reduce/3 - Consider MyEnum.reduce from the Elixir lecture slides. Lab4.reduce will build on this. You will add an implementation that handles the optional 3rd argument to initialize acc. 3) tailfib/1 - This function accepts an integer argument, n, and returns the nth Fibonacci number. Assume the first two Fibonacci numbers are 1 and 1 . That is, tailFib(1) =1, tailFib(2) ==1. There is no tailFib(0). Your tail-recursive implementation must avoid the double recursive call. NoO(2n) ! 4) giveChange/2 - This function accepts an amount of money, and a list of coin values (in descending order). The function should return a list containing the minimum number of coins necessary to represent the money amount. The returned list should be in descending order. If it is not possible to make change for the amount with the provided list of coins, you should return the : error atom. Several examples are below. You may assume the coin values are provided such that the greedy solution will always be correct. Subtract the largest coin possible at each step. 5) reduce/3 - Consider MyEnum.reduce from the Elixir lecture slides. Lab4.reduce will build on this. You will add an implementation that handles the optional 3rd argument to initialize acc. For example - the following two examples, exactly as written, should work correctly: Lab4. reduce ([1,2,3],fn(x,acc)x+acc end ) Lab4. reduce ([1,2,3],10,fn(x,acc)x+acc end ) You may use helper functions if you wish, so long as the user can invoke your function from the outside world as seen above. Submission Labs are to be completed and submitted individually. Submit your Lab4.ex source file on D2L under Lab \#4. You do not need to submit the entire mix project
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
