What's the meaning of the following code:
(([move #(turn % -1) #(turn % 1)] (wrand [(if (:ant @ahead) 0
(ranks ahead)) (ranks ahead-left) (ranks ahead-right)]))
loc)))
in https://www.refheap.com/paste/3099 from line 192 to 195?
Sorry to bother
Hi Gary,
Your examination makes perfect sense in the context.
Thanks for your help!
Yu
On Tue, Jul 29, 2014 at 8:01 AM, Gary Johnson wrote:
> Hi Yu,
>
> This is a pretty dense (and IMHO non-idiomatic) piece of Clojure code.
> Without reading the paste you provided, I can at least tell you
, and recur)
a lot, but for readability and expressiveness, some of such loop structure
could be more elegantly expressed as list expressions of filters, etc.
I'd like to seek your advise, whether my following code could be improved
in both purposes?
Thanks a lot for your help!
Yu Shen
Here is the link to the gist for the
code https://gist.github.com/yubrshen/63ffda973aff27d39868
On Wednesday, October 15, 2014 4:12:56 PM UTC+8, Yu Shen wrote:
>
> In the following code, I'm struggling to be idiomatic and at the same time
> to consider save times of iterations. I