Question: 6. Write a recursive Haskell function rotate3 Integer -Char> Char -> Char -> String such that rotate3 n item1 item2 item3 returns a string of

 6. Write a recursive Haskell function rotate3 Integer -Char> Char ->

6. Write a recursive Haskell function rotate3 Integer -Char> Char -> Char -> String such that rotate3 n item1 item2 item3 returns a string of length n, re- peatedly cycling among item1, item2 and item3. Your function should return the empty string if n is negative. As an example, rotate3 8 's!' should return "su!su!su

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!