Write a recursive ML function that uses pattern matching with


 Write a recursive ML function that uses pattern matching with name/type
 optconcat : char option list  -> string

that inputs a list of char options, and returns a single string consisting of all characters on the list concatenated together while ignoring any instances of NONE. For example,

     - optconcat([SOME #"b",NONE,SOME #"o",SOME #"o",NONE]);
     val it = "boo" : string
     - optconcat([NONE,NONE]);
     val it = "" : string

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions