Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,2 @@
open System
for i in [5; 50; 9000] do printfn "%s" <| Convert.ToString (i, 2)

View file

@ -0,0 +1,10 @@
open System
// define the function
let printBin (i: int) =
Convert.ToString (i, 2)
|> printfn "%s"
// use the function
[5; 50; 9000]
|> List.iter printBin

View file

@ -0,0 +1,10 @@
open System
open System.IO
// define a callback function for %a
let bin (tw: TextWriter) value =
tw.Write("{0}", Convert.ToString(int64 value, 2))
// use it with printfn with %a
[5; 50; 9000]
|> List.iter (printfn "binary: %a" bin)