Arc Forumnew | comments | leaders | submitlogin
2 points by zck 5141 days ago | link | parent

>1. progn in Arc ?

'do, as in the following[1]:

  (if (< (rand) 0.5)
      (do (prn "No, Mr. Bond, I expect you to die...")
          (-- mi6 007)))
Some of your questions may be answered if you read through the tutorial: http://ycombinator.com/arc/tut.txt There's stuff you won't pick up on the first time that you'll want to know later.

>2.find with a :key in Arc

An example in Common Lisp, just to make sure we're talking about the same thing:

  [1]> (find 'vader
             '((indiana-jones whip snakes)
               (vader lightsabre light-side)
               (dijkstra EWDs goto)))
  NIL
  
  [2]> (find 'vader
             '((indiana-jones whip snakes)
               (vader lightsabre light-side)
               (dijkstra EWDs goto))
             :key #'car)
  (VADER LIGHTSABRE LIGHT-SIDE)
The behavior in #2, correct? You'll have to make a function to perform the key action on the element, as in the following:

  arc> (find [is (car _) 'vader]
             '((indiana-jones whip snakes)
               (vader lightsabre light-side)
               (dijkstra EWDs goto)))
  (vader lightsabre light-side)
As a side note, you asked [2] about getting SLIME set up on Windows. I wrote up a guide on how to set it up on Linux; you can probably plunder it for information about how to set it up on Windows. I also had a few questions about your setup; it's not at all like mine.

[1]Yes, this is just 'when. Shush, it's an example.

[2]http://arclanguage.com/item?id=14958



1 point by ly47 5141 days ago | link

Hi zck Thanks a lot . Problems of find with :key and progn in Arc solved. About emacs and Arc still don't work. I use emacs for common-lisp with lisp-cabinet. For an editor I use scite which i configured to work with Arc(I had to make write some scripts with AutoIt) Thanks again ly

-----

2 points by zck 5141 days ago | link

Sorry, I forgot to link my SLIME thread: http://arclanguage.com/item?id=14998

Could you answer my questions in your other thread? http://arclanguage.com/item?id=15002 It's really hard to try to help you without more details than "emacs and Arc still don't work".

-----