This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README.textile | ||
| |
lib/ | ||
| |
simple_promise.gemspec | ||
| |
spec/ |
README.textile
A lazy evaluation implementation:
lazy = SimplePromise.new { 1 + 1 } lazy + 3- 5
- 5
A SimplePromise differs from the result of its promised block only in two ways.
First, #inspect shows that it is in fact a promise:
- #<SimplePromise computation=#<Proc:0×000@/foo.rb:44> result=[promised]>
- #<SimplePromise computation=#<Proc:0×000@/foo.rb:44> result=2>
Second, literal truthiness evaluations will always be positive:
lazy_true = SimplePromise.new { true } lazy_false = SimplePromise.new { false } lazy_true ? “positve truthiness” : “negative truthiness”- “positive truthiness”
- “positve truthiness”








