Skip to content

Instantly share code, notes, and snippets.

@kos59125
Created February 4, 2020 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kos59125/4f2065965d93d79201b6bb9031263e06 to your computer and use it in GitHub Desktop.
Save kos59125/4f2065965d93d79201b6bb9031263e06 to your computer and use it in GitHub Desktop.
open System.Text
let append : string list -> string =
List.fold (fun (builder:StringBuilder) -> builder.Append) (StringBuilder())
>> fun builder -> builder.ToString()
// aA
append ["a"; "A"] |> printfn "%s"
// aAbB
append ["b"; "B"] |> printfn "%s"
// aAbBcC
append ["c"; "C"] |> printfn "%s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment