Write a function append_fr : 'a list -> 'a list -> 'a list that returns a list
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function append_fr : 'a list -> 'a list -> 'a list that returns a list containing the elements in the first list at the front of the second, with the order of the two lists preserved. Your function is required to use (only) forward recursion (no other form of recursion). You may not use any library functions, or @. # let rec append_fr list1 list1 = ...;; val append_fr : 'a list -> 'a list -> 'a list = # append_fr [1;3] [2;4];; - : int list = [1; 3; 2; 4]
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date: