I stand corrected. I guess I believed Hal Abelson when he used
Scheme/Lisp interchangeably.
On Tuesday, April 14, 2015 at 2:39:32 AM UTC+2, Alexis wrote:
Sebastian Bensusan sbe...@gmail.com javascript: writes:
As a side notes, in Lisp it is convention to append ! to those
functions
Sebastian Bensusan sbe...@gmail.com writes:
I stand corrected. I guess I believed Hal Abelson when he used
Scheme/Lisp interchangeably.
Well, i myself consider Scheme a Lisp - particularly when
comparing it to programming languages in general, rather than to
other Lisps specifically - but
On Tuesday, April 14, 2015 at 2:53:16 AM UTC+7, Sebastian Bensusan wrote:
As a side notes, in Lisp it is convention to append ! to those functions
that have side-effects (i.e. mutate state). A good candidate would be
`reset-games!`.
This is also an evidence that Andrea hasn't read the
Yes thanks to everyone, I actually did read that guide it but after I
implemented that function.
And I really like this convention, but I just need to get used before
I remember to add the rigth ? and !.
Anyway another question about that, so suppose my ref is initialized
as (defonce live-games
That's what fixtures are for:
https://clojuredocs.org/clojure.test/use-fixtures
(with-fixture :each (reset-games))
As a side notes, in Lisp it is convention to append ! to those functions
that have side-effects (i.e. mutate state). A good candidate would be
`reset-games!`.
On Monday, April
Sebastian Bensusan sbe...@gmail.com writes:
As a side notes, in Lisp it is convention to append ! to those
functions that have side-effects (i.e. mutate state).
Well, not in /all/ Lisps. :-) It is the convention in Scheme[1],
for example, but not in e.g. Emacs Lisp or Common Lisp. In the
Awesome thanks, the only thing is that the reason why I did the
reset-games thing is because in the tests I can reset things every
time.
(testing create new game
(reset-games)
(new-game)
(is (= 1 (length-current-games
If I don't do that then it's harder in the tests to have a
Hi,
I browsed over it, a couple of things:
`defonce` is meant for code reloading:
(defonce live-games (ref {})))
Don't use `for` when you can use `map`:
(mapv (fn [i] {:char i :visible (not (valid-char i))}))
Strings can be treated as sequences:
(first (.toLowerCase (str char)))
Hope this