Created
October 27, 2013 01:43
-
-
Save alfredplpl/7176977 to your computer and use it in GitHub Desktop.
Its behavior is like hash (associative array).
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
#Its behavior is like hash (associative array). | |
hash.test=list("square"=function(x){x**2}, | |
"pi"=3.1415926535) | |
hash.test[["square"]](2) | |
hash.test[["pi"]] | |
#probability that a random selected number is a prime number. | |
6/hash.test[["square"]](hash.test[["pi"]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment