-
-
Save BenGoldberg1/a2e8e52bf30639f596711dd6c3c7da11 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
proto A(Int \π, Int \π) { (state @)[π][π] //= {*} } | |
multi A(0, Int \π) { π + 1 } | |
multi A(1, Int \π) { π + 2 } | |
multi A(2, Int \π) { 3 + 2 * π } | |
multi A(3, Int \π) { 5 + 8 * (2 ** π - 1) } | |
multi A(Int \π, 0 ) { A(π - 1, 1) } | |
multi A(Int \π, Int \π) { A(π - 1, A(π, π - 1)) } | |
say A(4,1); | |
say .chars, " digits starting with ", .substr(0,50), "..." given A(4,2); | |
say "Took {now - INIT {now}} seconds." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment