What about:
safe-cell? (as described)
reveal-safe-cells (as existing)
(defn reveal-safe-cells-if-safe-cell [gs]
(if (safe-cell? gs)
(reveal-safe-cells gs)
gs))
and elsewhere
(-> gs
...
...
(reveal-safe-cells-if-safe-cell)
...
...)
--
You received this message because you a
I wrote packthread to avoid needing threading counterparts of a bunch of
control forms - it rewrites threading through control forms.
https://github.com/maitria/packthread
It doesn't (yet) solve when you need the threaded value in the middle of a
threading form. I've had some thoughts about thre
On 25 April 2016 at 21:03, Rafał Cieślak wrote:
> Hi,
>
> I'm writing a turn-based game and one of the biggest functions is the one
> which handles player moves. It receives the current game state (a map) and
> the index of the cell that the player clicked on (an integer).
>
> It has to make a co
Hi,
I'm writing a turn-based game and one of the biggest functions is the one
which handles player moves. It receives the current game state (a map) and
the index of the cell that the player clicked on (an integer).
It has to make a couple of decisions based on the game state. So far I just
us
Hi Michael,
Thanks for the implementation suggestion. I left school 2 years only
so missed out on some of the more advanced mathematics, hence I was
unaware of the function and purpose of log. Since reading your post,
I've done a little bit of research on log as to educate myself. I've
now re-impl
Hi,
Am 04.02.2010 um 20:00 schrieb Erik Price:
> What kind of naming convention is appropriate for a function that
> operates on a sequence, and, as one of its return values, returns a
> new head for (or in other words a subsequence within) that sequence?
> For example, a function that consumes s
What kind of naming convention is appropriate for a function that
operates on a sequence, and, as one of its return values, returns a
new head for (or in other words a subsequence within) that sequence?
For example, a function that consumes some portion of a stream. Or is
it not conventional for a
On 4 February 2010 08:04, Wardrop wrote:
> (defn [n base]
> (loop [n n count 0]
> (if (< n base)
> {:val n :count count}
> (recur (float (/ n base)) (inc count)
>
> [ ... ]
>
> I mean, what the hell would you name this function, or would you not
> create such an obscure and gene
;, "KB", "MB", "GB",
> "TB).
>
> I mean, what the hell would you name this function, or would you not
> create such an obscure and generalised function to start with?
>
> On Feb 4, 3:15 pm, Jonathan Smith wrote:
>> A function would be named
On 4 February 2010 09:04, Wardrop wrote:
> I often myself creating functions which perform a rather clear and
> simple task, but which is hard to describe, either because I don't
> know the term for what I've just implemented, or because the function
> is difficult to summarise in a couple of word
b 4, 3:15 pm, Jonathan Smith wrote:
> A function would be named based on what it is that it does.
>
> Difficulty naming functions would imply to me that the functions
> involved do not contain a clear functionality.
>
> The names of the functions should sort of be an 'emerge
A function would be named based on what it is that it does.
Difficulty naming functions would imply to me that the functions
involved do not contain a clear functionality.
The names of the functions should sort of be an 'emergent property' of
a larger process of reasoning through the p
ve meaning to a method. I'm finding at the moment that I'm
> spending half my time thinking of decent names for functions. I'm just
> wondering what process you all use when it comes to naming functions?
>
>
Can you give a more specific example of something that your having
7;m
spending half my time thinking of decent names for functions. I'm just
wondering what process you all use when it comes to naming functions?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
14 matches
Mail list logo