aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHVukman <peterslopp@googlemail.com>2025-07-28 16:16:41 +0200
committerGitHub <noreply@github.com>2025-07-28 16:16:41 +0200
commit411310f9aaa52e5756ff901e6dd7e608c1b79b32 (patch)
tree4b451a9a5246201f31563773647861775909e0c9
parent058ee3085e2de9027246ec49fc8a2056a3f4500a (diff)
downloadperlweeklychallenge-club-411310f9aaa52e5756ff901e6dd7e608c1b79b32.tar.gz
perlweeklychallenge-club-411310f9aaa52e5756ff901e6dd7e608c1b79b32.tar.bz2
perlweeklychallenge-club-411310f9aaa52e5756ff901e6dd7e608c1b79b32.zip
Create 332_p2.fs
-rw-r--r--challenge-332/hvukman/f#/332_p2.fs11
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-332/hvukman/f#/332_p2.fs b/challenge-332/hvukman/f#/332_p2.fs
new file mode 100644
index 0000000000..81c9d24f39
--- /dev/null
+++ b/challenge-332/hvukman/f#/332_p2.fs
@@ -0,0 +1,11 @@
+// 332 part 2
+let inp_list = [| "weekly"; "perl"; "challenge"|];
+
+let odd x = Seq.toList x |>
+ // go over Seq and filter not equal characters
+ List.map (fun y -> String.filter (fun z -> y=z ) x) |>
+ // check if unique characters are in list in multiple of two
+ List.filter (fun w -> String.length(w)%2=0)
+
+for i in inp_list do
+ if List.length(odd i)>0 then printf "false\n" else printf "true\n"