Skip to content

Instantly share code, notes, and snippets.

@alfredplpl
Created October 27, 2013 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredplpl/7176985 to your computer and use it in GitHub Desktop.
Save alfredplpl/7176985 to your computer and use it in GitHub Desktop.
the result of hashLikeList.R
> hash.test[["square"]](2)
[1] 4
> hash.test[["pi"]]
[1] 3.141593
>
> #probability that a random selected number is a prime number.
> 6/hash.test[["square"]](hash.test[["pi"]])
[1] 0.6079271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment