Created
September 19, 2019 05:08
-
-
Save OnurGumus/2b1f28669bae2f9fdbdd6cc1db1dec6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Fable | |
open Fable.Core | |
open Fable.Core.JS | |
let parityl( x : uint64 ) = | |
let mutable x = x | |
let mutable result : uint64 = uint64 0 | |
while (x > uint64(0L)) do | |
result <- result + (x &&& uint64 1) | |
x <- (x >>> 1) | |
result | |
printf "%A" (parityl (uint64 7 )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment