Arc Forumnew | comments | leaders | submitlogin
4 points by i4cu 16 days ago | link | parent

It's probably worth reading the arc tutorial [1].

I mention it because pg makes a fairly good point about using alists.

  "There is a tradition in Lisp going back to McCarthy's 1960 paper [2] 
  of using lists to represent key/value pairs:

  arc> (= codes '(("Boston" bos) ("Paris" cdg) ("San Francisco" sfo)))
  (("Boston" bos) ("Paris" cdg) ("San Francisco" sfo))

  This is called an association list, or alist for short.  I once
  thought alists were just a hack, but there are many things you can
  do with them that you can't do with hash tables, including sort
  them, build them up incrementally in recursive functions, have
  several that share the same tail, and preserve old values"
Of course none of this negates anything in akkartik's response. I just think there are some helpful tips in the tutorial.

1. http://www.arclanguage.org/tut.txt