Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module CalculatePoints
- type tile = char * Map<uint32, uint32 -> (char * int)[] -> int -> int>
- let calculatePoints (list:tile list) (word:(char*int)[])=
- List.fold (fun (acc,index) t ->(((snd t)|>(Map.map(fun _ value->value index word)))::acc,index+1u)) ([],0u) list|>
- fst|>
- List.collect(Map.toList)|>
- List.sortBy(fst)|>
- List.map(snd)|>
- List.fold (>>) id<|0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement