Arc Forumnew | comments | leaders | submitlogin
1 point by thaddeus 5808 days ago | link | parent

Great! That worked for me.... Not sure why I didn't think of it, but hey I've only been programming for a month now :) Thanks for everyone's help. T.

    (= my-data-table-1 (table))
    (= (my-data-table-1 'drink) 'milk)
    (= (my-data-table-1 'eat) 'eggs)

    arc> (keys my-data-table-1)
    (drink eat)
    arc> (vals my-data-table-1)
    (milk eggs)

    (= my-data-table-2 (table))
    (= (my-data-table-2 'run) 'fast)
    (= (my-data-table-2 'walk) 'slow)

    arc>(keys my-data-table-2)
    (walk run)
    arc>(vals my-data-table-2)
    (slow fast)

    (= tables* (table))
    (= (tables* '0) my-data-table-1)
    (= (tables* '1) my-data-table-2)

    (def load-ordered-tables ()
      (for i 0 (- (len tables*) 1)
        (let current-table (tables* i)
          (pr (vals current-table))
     )
      ))
	

    arc> (load-ordered-tables)
    (milk eggs)(slow fast)nil


1 point by CatDancer 5808 days ago | link

You're welcome!

If it turns out that you just need a list of your data tables, you can do this:

  (= tables* (list my-data-table-1 my-data-table-2))

  (def load-ordered-tables ()
    (each current-table tables*
      (pr (vals current-table))))

-----

1 point by thaddeus 5808 days ago | link

and ..Hey go figure..... I even figured out how to make it work the way I was originally attempting to make it work ! :)

    arc> temp-table
    #hash((0 . (0 hUv086uP)) (1 . (1 CH3w2sdp)))
    
    arc> ((temp-table 1) 1)
    CH3w2sdp

    (= CH3w2sdp (table))
    (= (CH3w2sdp 'run) 'fast)
    (= (CH3w2sdp 'walk) 'slow)

    (def thad ()
       (eval `(vals ,((temp-table 1) 1))))

     arc>(thad)
     (slow fast)
T.

-----

1 point by lboard 5781 days ago | link

Thanks

-----