Skip to content

Instantly share code, notes, and snippets.

@jeremyabbott
Created June 19, 2015 17:36
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 jeremyabbott/6e7a214f3bd93acc572a to your computer and use it in GitHub Desktop.
Save jeremyabbott/6e7a214f3bd93acc572a to your computer and use it in GitHub Desktop.
open System
let getLyrics (input : string) (matchString : string) =
input.Split([|matchString|], StringSplitOptions.RemoveEmptyEntries)
|> Array.reduce (fun acc item -> sprintf "%s %s" acc item)
[<EntryPoint>]
let main argv =
printfn "%A" (getLyrics "WUBWUBWUBIWUBAMWUBWUBXWUBWUBWUB" "WUB")
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment