use recursion to dene a function position which


Use recursion to de ne a function position which has as input an integer, a character and a string and returns the result of inserting the character in the string at the position speci ed by the integer. For example: position 4

'a' "012xyz6" = "012xayz6"

An error message should be returned for negative input or if the position is more than the length of the string. De ne a function position2 which has the same e ect as position but which is de ned using take and drop instead of recursion

Request for Solution File

Ask an Expert for Answer!!
Application Programming: use recursion to dene a function position which
Reference No:- TGS0207736

Expected delivery within 24 Hours