I expected a delay only to be forced by an explicit call to force.
instead it looks like, being a kind of IDeref, a delay will be forced
by the REPL.

e.g.

user=> (def del (delay (println "printed") (+ 2 3)))
#'user/del
user=> del
printed
#<de...@8691dee: 5>
user=> (force del)
5

The documentation seems to imply the only way to force a delay is
through the force procedure...

" Takes a body of expressions and yields a Delay object that will
  invoke the body only the first time it is forced (with force), and
  will cache the result and return it on all subsequent force
  calls."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to