On Thu, Oct 18, 2012 at 1:32 PM, Grant Rettke <[email protected]> wrote:
> On Thu, Oct 18, 2012 at 11:11 AM, David Nolen <[email protected]> wrote:
>> On Thu, Oct 18, 2012 at 12:01 PM, JvJ <[email protected]> wrote:
>>>
>>> I'm not sure if anyone's done this before, but I'm fed up with writing
>>> code that looks like this:
>>
>>
>> What problem does this solve given you can do the following?
>>
>> (let [a 1
>> _ (println a)
>> b 2
>> _ (println b)
>> c 3
>> _ (println c)]
>> ...)
>
> -1 to using a binding form to do sequencing. That said, not sure what is
> better!
David so as not to be a total loser here is an alternative that is
maybe the right way but also maybe the very wrong way!
(-> ((fn []
(let [a 1]
(println "this is a: " a)
a)))
((fn [a]
(let [b 2]
(println "this is b: " b)
(list a b))))
((fn [[a b]]
(let [c 3]
(println "this is c: " c)
(println "Sum: " (+ a b c))))))
JvJ what is your verdict?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en