ML / SML Code only please! If ELSE FORMAT. DO NOT COPY USE THE OTHER ANSWERS ON CHEGG. THEY'RE WRONG. Write a function delnthc to delete the n-th character of a string. You may assume that the input...


ML / SML Code only please! If ELSE FORMAT. DO NOT COPY USE THE OTHER ANSWERS ON CHEGG. THEY'RE WRONG.



  1. Write a functiondelnthc to delete the n-th character of a string. You may assume that the input string is always longer than n.

    delnthc("abcdef", 4) → "abcef"

  2. Write a functionmultin to take a list of three [a,b,c] and multiplies a by b c times.Function definition must look like multin(L)! CAN NOT USE multin(a,b,c). You have to use let-in-end in if-then-else style NOT @

    CAN NOT USE function power(a,b) =a*a*a...,


    multin [2,3,5] → [2,6,18,54,162,486]

  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