open System let bin x = let rec b a x = let o = x % 2 let d = x / 2 let r = match o with | 1 -> "1" + a | 0 -> "0" + a if d > 0 then b r d else r b "" x type Int32 with member it . ToBin () = bin it [< STAThread >] [< EntryPoint >] let main _ = let i = 0b101 printfn "%s" ( i . ToBin ()) exit 0
t.me/perfect0sight