Skip to content

Instantly share code, notes, and snippets.

@alfredplpl
Created October 27, 2013 01:43
Show Gist options
  • Save alfredplpl/7176977 to your computer and use it in GitHub Desktop.
Save alfredplpl/7176977 to your computer and use it in GitHub Desktop.
Its behavior is like hash (associative array).
#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