Last active
July 8, 2020 04:57
-
-
Save nzpr/3fc582b55089bcee344d4f51bbf181e6 to your computer and use it in GitHub Desktop.
cpu-load-test.rho
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) } | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) } | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) } | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) } | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) } | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) } | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) } | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) } | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) } | |
} | | |
d1!(2) | | |
d2!(2) | | |
d3!(2) | | |
d4!(2) | | |
d5!(2) | | |
d6!(2) | | |
d7!(2) | | |
d8!(2) | | |
d9!(2) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(10) | | |
d2!(10) | | |
d3!(10) | | |
d4!(10) | | |
d5!(10) | | |
d6!(10) | | |
d7!(10) | | |
d8!(10) | | |
d9!(10) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(7) | | |
d2!(7) | | |
d3!(7) | | |
d4!(7) | | |
d5!(7) | | |
d6!(7) | | |
d7!(7) | | |
d8!(7) | | |
d9!(7) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(4) | | |
d2!(4) | | |
d3!(4) | | |
d4!(4) | | |
d5!(4) | | |
d6!(4) | | |
d7!(4) | | |
d8!(4) | | |
d9!(4) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(11) | | |
d2!(11) | | |
d3!(11) | | |
d4!(11) | | |
d5!(11) | | |
d6!(11) | | |
d7!(11) | | |
d8!(11) | | |
d9!(11) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(11) | | |
d2!(11) | | |
d3!(11) | | |
d4!(11) | | |
d5!(11) | | |
d6!(11) | | |
d7!(11) | | |
d8!(11) | | |
d9!(11) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(8) | | |
d2!(8) | | |
d3!(8) | | |
d4!(8) | | |
d5!(8) | | |
d6!(8) | | |
d7!(8) | | |
d8!(8) | | |
d9!(8) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(5) | | |
d2!(5) | | |
d3!(5) | | |
d4!(5) | | |
d5!(5) | | |
d6!(5) | | |
d7!(5) | | |
d8!(5) | | |
d9!(5) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(2) | | |
d2!(2) | | |
d3!(2) | | |
d4!(2) | | |
d5!(2) | | |
d6!(2) | | |
d7!(2) | | |
d8!(2) | | |
d9!(2) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(12) | | |
d2!(12) | | |
d3!(12) | | |
d4!(12) | | |
d5!(12) | | |
d6!(12) | | |
d7!(12) | | |
d8!(12) | | |
d9!(12) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(9) | | |
d2!(9) | | |
d3!(9) | | |
d4!(9) | | |
d5!(9) | | |
d6!(9) | | |
d7!(9) | | |
d8!(9) | | |
d9!(9) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(6) | | |
d2!(6) | | |
d3!(6) | | |
d4!(6) | | |
d5!(6) | | |
d6!(6) | | |
d7!(6) | | |
d8!(6) | | |
d9!(6) | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1)} | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1)} | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1)} | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1)} | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1)} | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1)} | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1)} | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1)} | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1)} | |
} | | |
d1!(3) | | |
d2!(3) | | |
d3!(3) | | |
d4!(3) | | |
d5!(3) | | |
d6!(3) | | |
d7!(3) | | |
d8!(3) | | |
d9!(3) | |
} |
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
new stdout(`rho:io:stdout`), uname in { | |
stdout!("check balance, 1, id " ++ "${uname}"%%{"id":*uname}) | |
} |
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
new | |
rl(`rho:registry:lookup`), stdout(`rho:io:stdout`), | |
revVaultCh, vaultCh, balanceCh, log | |
in { | |
log!("check balance, 1, id " ++ "${id}"%%{"id":*log}) | | |
rl!(`rho:rchain:revVault`, *revVaultCh) | | |
for (@(_, revVault) <- revVaultCh) { | |
log!("check balance, 2, id " ++ "${id}"%%{"id":*log}) | | |
match "1111Ysns49wrejhzKeUP25JXFaMhYXVWMz4DALNEh3vCUJBYpHLDz" { | |
revAddress => { | |
log!("check balance, 3, id " ++ "${id}"%%{"id":*log}) | | |
@revVault!("findOrCreate", revAddress, *vaultCh) | | |
for (@(true, vault) <- vaultCh) { | |
log!("check balance, 4, id " ++ "${id}"%%{"id":*log}) | | |
@vault!("balance", *balanceCh) | | |
for (@balance <- balanceCh) { | |
log!("check balance, 5, id " ++ "${id}"%%{"id":*log}) | | |
log!("Balance of " ++ revAddress ++ " is ${balance}."%%{"balance":balance}) | |
} | |
} | |
} | |
} | |
} | | |
contract log(@data) = { | |
stdout!(data) | |
} | |
} |
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
new | |
rl(`rho:registry:lookup`), stdout(`rho:io:stdout`), | |
revVaultCh, vaultCh, balanceCh, log | |
in { | |
log!("check balance, 1") | | |
rl!(`rho:rchain:revVault`, *revVaultCh) | | |
for (@(_, revVault) <- revVaultCh) { | |
log!("check balance, 2") | | |
match "1111Ysns49wrejhzKeUP25JXFaMhYXVWMz4DALNEh3vCUJBYpHLDz" { | |
revAddress => { | |
log!("check balance, 3") | | |
@revVault!("findOrCreate", revAddress, *vaultCh) | | |
for (@(true, vault) <- vaultCh) { | |
log!("check balance, 4") | | |
@vault!("balance", *balanceCh) | | |
for (@balance <- balanceCh) { | |
log!("check balance, 5") | | |
log!("Balance of " ++ revAddress ++ " is ${balance}."%%{"balance":balance}) | |
} | |
} | |
} | |
} | |
} | | |
contract log(@data) = { | |
stdout!(data) | |
} | |
} |
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
new d1,d2,d3,d4,d5,d6,d7,d8,d9 in { | |
contract d1(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) | d1!(depth - 1) } | |
} | | |
contract d2(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) | d2!(depth - 1) } | |
} | | |
contract d3(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) | d3!(depth - 1) } | |
} | | |
contract d4(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) | d4!(depth - 1) } | |
} | | |
contract d5(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) | d5!(depth - 1) } | |
} | | |
contract d6(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) | d6!(depth - 1) } | |
} | | |
contract d7(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) | d7!(depth - 1) } | |
} | | |
contract d8(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) | d8!(depth - 1) } | |
} | | |
contract d9(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) | d9!(depth - 1) } | |
} | | |
d1!(4) | | |
d2!(4) | | |
d3!(4) | | |
d4!(4) | | |
d5!(4) | | |
d6!(4) | | |
d7!(4) | | |
d8!(4) | | |
d9!(4) | |
} |
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
new dupe in { | |
contract dupe(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | |
} | |
} | dupe!(2) | |
} |
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
new dupe in { | |
contract dupe(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | |
} | |
} | dupe!(2) | |
} |
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
new dupe in { | |
contract dupe(@depth) = { | |
if (depth <= 0) { | |
Nil | |
} else { | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | | |
dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | dupe!(depth - 1) | |
} | |
} | dupe!(2) | |
} |
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
new | |
rl(`rho:registry:lookup`), RevVaultCh, | |
vaultCh, balanceCh, | |
deployId(`rho:rchain:deployId`), | |
stdout(`rho:io:stdout`) | |
in { | |
rl!(`rho:rchain:revVault`, *RevVaultCh) | | |
for (@(_, RevVault) <- RevVaultCh) { | |
stdout!(("MyRChainWallet.CheckBalance.rho")) | | |
match "1111wz8Ga8b6pPnDgKarjMeFBYr1Fsor8CUfpXfaNcD3D2328sbfv" { | |
revAddress => { | |
stdout!(("Accessing vault at RevAddress", revAddress)) | | |
// most RevVault methods return an `Either[String, A] = (false, String) / (true, A)` | |
@RevVault!("findOrCreate", revAddress, *vaultCh) | | |
for (@(true, vault) <- vaultCh) { | |
stdout!("Obtained vault, checking balance") | | |
@vault!("balance", *balanceCh) | | |
for (@balance <- balanceCh) { | |
stdout!(("Balance is", balance)) | | |
deployId!(balance) | |
} | |
} | |
} | |
} | |
} | |
} |
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
new x in {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment