Skip to content

Instantly share code, notes, and snippets.

@OnurGumus
Created September 19, 2019 05:08
Show Gist options
  • Save OnurGumus/2b1f28669bae2f9fdbdd6cc1db1dec6f to your computer and use it in GitHub Desktop.
Save OnurGumus/2b1f28669bae2f9fdbdd6cc1db1dec6f to your computer and use it in GitHub Desktop.
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