You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tests/Tests.fs there is a note about why we have code duplication. Need to follow-up with the linked thread and find out if there is a way around this situation through polymorphic record access.
In tests/Tests.fs there is a note about why we have code duplication. Need to follow-up with the linked thread and find out if there is a way around this situation through polymorphic record access.
// NOTE: The following two method implementations exist because I can't polymorphically access the Word field
// of two different record types in F#
// See: https://fslang.uservoice.com/forums/245727-f-language/suggestions/9633858-structural-extensible-records-like-elm-concrete
let getUniqueCharsFromInputWords (wl:InputWords) =
new String(
wl
|> Seq.map (fun w -> w.Word.ToLowerInvariant())
|> Seq.collect (fun ltrs -> ltrs.ToCharArray())
|> Seq.sort
|> Seq.toArray)
let getUniqueCharsFromPuzzleWords (pw:PuzzleWords) =
new String(
pw
|> Seq.map (fun w -> w.Word.ToLowerInvariant())
|> Seq.collect (fun ltrs -> ltrs.ToCharArray())
|> Seq.sort
|> Seq.toArray)
The text was updated successfully, but these errors were encountered: