Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.24 KB | None | 0 0
  1. let getScore =
  2.   let answers = ["b"; "a"; "a"; "c"; "d"; "d"; "c"; "a"; "a"; "d"; "a"; "d"; "a"; "a"; "d"; "e"]
  3.   List.map2 (=) answers >> List.filter id >> List.length
  4.  
  5. let getCorrect l = l |> List.map (fun (name, ans) -> (name, getScore ans))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement