Created
October 8, 2015 14:15
-
-
Save ten0s/b548709ae94b2f9f4207 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
lists:foldr(fun(B, {I, Acc}) -> {I+1, B*trunc(math:pow(2, I))+Acc} end, {0,0}, [I || <<I:1>> <= <<$h>>]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment