From 14867ad844bf5241f826fa4b6c8519712daab066 Mon Sep 17 00:00:00 2001 From: HVukman Date: Sat, 12 Jul 2025 09:58:02 +0200 Subject: Create 329_p1.fs --- challenge-329/hvukman/f#/329_p1.fs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 challenge-329/hvukman/f#/329_p1.fs diff --git a/challenge-329/hvukman/f#/329_p1.fs b/challenge-329/hvukman/f#/329_p1.fs new file mode 100644 index 0000000000..e41216743b --- /dev/null +++ b/challenge-329/hvukman/f#/329_p1.fs @@ -0,0 +1,9 @@ +// Part 1 + +//with regex match and filter distinct + +let splitRuns s = Regex("\d+").Matches(s) |> Seq.cast |> Seq.map (fun m -> m.Value) |> Seq.toList |> Seq.distinct +printfn "%A" (splitRuns "go21od1lu5c7k") +printfn "%A" (splitRuns "the1weekly2challenge2") +printfn "%A" (splitRuns "4p3e2r1l") +printf "\n" -- cgit