Please only use SML / ML code. Do not copy the codes on chegg, they're wrong. Write a function int2str to convert an integer to a string int2str(1234) → "1234", int2str(~1234) → "~1234" Write a...


Please only use SML / ML code. Do not copy the codes on chegg, they're wrong.



  1. Write a functionint2str to convert an integer to a string

    int2str(1234) → "1234", int2str(~1234) → "~1234"

  2. Write a functionstr2int to convert a string to an integer (assume that the number is always valid)

    str2int("1234") → 1234, str2int("~1234") → ~1234

  3. Write a functionpairStarto form a new string where identical chars that
    are adjacent in the original string are separated from each other by a "*"

    pairStar("xxyy") → "x*xy*y", pairStar("aaaa") → "a*a*a*a"



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here