Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let task4 (words: string seq) : Text =
- let wordsCount = words |> Seq.countBy id
- let dict = wordsCount
- |> Seq.filter (fun x -> (snd x) > 5)
- |> Seq.map (fst)
- |> Seq.toArray
- let text = words
- |> Seq.map (fun x -> try Id(Array.findIndex (fun y -> y = x) dict) with | :? System.Collections.Generic.KeyNotFoundException -> String(x))
- (text, dict)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement