Arc Forumnew | comments | leaders | submitlogin
1 point by adm 5347 days ago | link | parent

Thanks for comments. No I have not run the code yet(and not even compiled).

Just to understand it: you say "c!fellas" => (c 'fellas), will that fetch the 'fellas element of c?



1 point by conanite 5347 days ago | link

If c is a table, it will return the value stored with the key 'fellas

But watch out, you have a lot of

  (each c u ...
, where u is universe; universe is a table. You probably want something like

  (each (pos cell) u ...
because that's how 'each works with tables.

In 'init-universe, you have

  (= (pos u) (create-cell i j))
(pos u) needs to be the other way around:

  (= (u pos) (create-cell i j))
and you can shorten it to

  (= u.pos (create-cell i j))

-----