• + 0 comments
    let dup list=  
           match list with
           |[] -> []
           |head :: tail -> List.fold (fun op head -> if List.contains head op then op else head :: op )[head] tail
           |> List.rev 
    
    let result = dup (List.ofSeq str)
    let op = System.String.Concat(Array.ofList(result))
    printfn "%s" op