Skip to content

Instantly share code, notes, and snippets.

@bojanrajkovic
Created October 26, 2010 19:49
Show Gist options
  • Save bojanrajkovic/647633 to your computer and use it in GitHub Desktop.
Save bojanrajkovic/647633 to your computer and use it in GitHub Desktop.
Emitted IL
.method public static
default void countdown (int32 n) cil managed
{
// Method begins at RVA 0x2064
// Code size 18 (0x12)
.maxstack 4
IL_0000: ldarg.0
IL_0001: switch (
IL_0011)
IL_000a: ldarg.0
IL_000b: ldc.i4.1
IL_000c: sub
IL_000d: starg.s 0
IL_000f: br.s IL_0000
IL_0011: ret
} // end of method Test3::countdown
let n = 1000000
let rec countdown n =
match n with
| 0 -> ()
| _ -> countdown (n-1)
countdown n
printfn "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment