codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
def cool @result ||= begin 10_000_000.times { 1 + 1 } # spend lots of time 5 end end p Time.now p cool # takes 4s p Time.now p cool # instant p Time.now
Private
[
?
]
Run code
Submit