Question: F# Exercise 2.5 Write a function implode : char list -> string implode [a;b;c] = abc Hint: Use List.foldBack. Now write a function implodeRev :
F#
Exercise 2.5 Write a function implode : char list -> string implode [a;b;c] = "abc" Hint: Use List.foldBack. Now write a function implodeRev : char list -> string so that implodeRev s returns the characters concatenated in reverse order into a string: implodeRev [a;b;c] = "cba" Hint: Use List.fold.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
