Skip to content

Instantly share code, notes, and snippets.

@adetokunbo
Last active April 19, 2019 08:13
Show Gist options
  • Save adetokunbo/5451cdc4f7b92d296ffe0a8f17f02fa2 to your computer and use it in GitHub Desktop.
Save adetokunbo/5451cdc4f7b92d296ffe0a8f17f02fa2 to your computer and use it in GitHub Desktop.
Weights calculation in GHCi
λ> map round $ drop 1 $ take 85 $ scanl (*) 1 (repeat $ 10 ** (logBase 10 2 / 7))
[1,1,1,1,2,2,2,2,2,3,3,3,4,4,4,5,5,6,7,7,8,9,10,11,12,13,14,16,18,20,22,24,26,29,32,35,39,43,48,53,58,64,71,78,86,95,105,116,128,141,156,172,190,210,232,256,283,312,345,380,420,464,512,565,624,689,761,840,927,1024,1131,1248,1378,1522,1680,1855,2048,2261,2497,2756,3043,3360,3710,4096]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment