feat: refactoring
This commit is contained in:
@@ -9,9 +9,7 @@ open System
|
|||||||
type Note = { Name: string; Length: int }
|
type Note = { Name: string; Length: int }
|
||||||
|
|
||||||
let parseNotes (input: string) =
|
let parseNotes (input: string) =
|
||||||
let gluedString = input.Replace('\n', ' ')
|
input.Replace('\n', ' ').Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
||||||
|
|
||||||
gluedString.Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
|
||||||
|> Seq.map (fun noteStr ->
|
|> Seq.map (fun noteStr ->
|
||||||
let noteSigns = noteStr.Split('-')
|
let noteSigns = noteStr.Split('-')
|
||||||
let name = noteSigns[0].Trim()
|
let name = noteSigns[0].Trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user