I was wondering whether there is somekind of reference available with the javascript methods called for each of the buttons in the ribbon. Question behind the question: I want to make a button on a wiki page which says "edit me", without the user having to go to the same button in the ribbon. Functionality should be exactly the same, but I need it on a different place. So what is the easiest way to find out which code the ootb "edit" button calls?


Question: Initial state in F# List.scan
Answer: You can use first element as an initial state:

let l = [ ("a", 2); ("b", 3); ("c", 2); ("d", 6) ]

let x::xs = l
let res = (x, xs) ||&gt; List.scan (fun (_, x) (o, n) -&gt; o, x + n) // [("a", 2); ("b", 5); ("c", 7); ("d", 13)]


Special case with empty list should be processed separately