Question: For all questions in this assignment, write Haskell code that computes the specified function. Use good Haskell style by including in your code the signature
For all questions in this assignment, write Haskell code that computes the specified function. Use good Haskell style by including in your code the signature of each top-level function above its definition (most signatures are actually provided in the questions). You can include as many other (helper) functions as you like.
Once again , please write the code in haskell language.
Question 3: Fibonacci Write a function fibo :: Int - [Integer] that for a given non-negative integer n returns the first n elements of the Fibonacci sequence. For example, fibo 6 should output [0, 1, 1, 2, 3, 5] Question 4: Going Backwards You already know the function reverse that receives a list and returns it with its elements in reversed order. Now write your own version of this function, named foldReverse, that does the same thing but uses a fold function (foldl or foldr) and a lambda expression to accomplish it. Question 3: Fibonacci Write a function fibo :: Int - [Integer] that for a given non-negative integer n returns the first n elements of the Fibonacci sequence. For example, fibo 6 should output [0, 1, 1, 2, 3, 5] Question 4: Going Backwards You already know the function reverse that receives a list and returns it with its elements in reversed order. Now write your own version of this function, named foldReverse, that does the same thing but uses a fold function (foldl or foldr) and a lambda expression to accomplish it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
