Ended up doing this using StringBuilder:

1
2
3
4
5
6
 
let AsString (cl:char list) =
  let sb = new Text.StringBuilder()
  for c in cl do
    sb.Append c |>ignore
  sb.ToString()
By on 4/14/2008 9:37 PM ()

I'd probably do somthing like this:

1
let myString = new string(Array.of_list ['H'; 'e';'l';'l';'o'])
By on 4/15/2008 12:14 AM ()

Robert:

much nicer, thanks! Now my function is simply:

1
2
let as_string (cl:char list) =
  new string(Array.of_list cl)

~Steve

By on 4/17/2008 12:43 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper