Answers for "f# set function how to ignore duplicates"

C#
0

f# set function how to ignore duplicates

let lengths = set["four"; "five"; "six"; "seven"]
              |> Set.map (fun s -> s.Length)
// val lengths : Set<int> = set [3; 4; 5]
Posted by: Guest on May-01-2021

C# Answers by Framework

Browse Popular Code Answers by Language