Advertisement
ttrd5r65r5r5

Untitled

May 2nd, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1.  
  2. module CalculatePoints
  3. type tile = char * Map<uint32, uint32 -> (char * int)[] -> int -> int>
  4.  
  5. let calculatePoints (list:tile list) (word:(char*int)[])=
  6. List.fold (fun (acc,index) t ->(((snd t)|>(Map.map(fun _ value->value index word)))::acc,index+1u)) ([],0u) list|>
  7. fst|>
  8. List.collect(Map.toList)|>
  9. List.sortBy(fst)|>
  10. List.map(snd)|>
  11. List.fold (>>) id<|0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement