Re: Multiple expressions in LET and exceptions

2012-02-03 Thread karpiu
Now that you said it, it all makes perfect sense. I'm in the process of switching from Scheme to Clojure and these are some "bad" habits. This case makes me also realise that dealing with lazy sequences can be a delicate matter in cases where you want eager evaluation, since you really have to call

Re: Multiple expressions in LET and exceptions

2012-02-02 Thread Timothy Baldridge
Map actually doesn't do anything at all. It simply creates a new lazy sequence. Instead of map, use doseq and you'll get the result you expect. Since you actually never print the result of the map, the lazy sequence is just thrown away, and f is never called, hence never evaluates. Timothy > For

Multiple expressions in LET and exceptions

2012-02-02 Thread karpiu
Hi, I spotted a weird behaviour of 'let' (or equivalently 'defn') when multiple expressions are used in the body of the form. When one of the expressions, but not the last one, throws an exception, it seems to be ignored and the final value of 'let' becomes the value of the last expression. For ex