Author Topic: [LISP] How to inject LET from clojure  (Read 921 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 323
[LISP] How to inject LET from clojure
« on: October 30, 2021, 01:07:37 AM »
I found inside clojure the function LET
How to transform the LET.clojure to LET.AutoLisp?

  (let [[x1 y1 x2 y2] (if steep [y1 x1 y2 x2] [x1 y1 x2 y2])]
      (let [[x1 y1 x2 y2] (if (> x1 x2) [x2 y2 x1 y1] [x1 y1 x2 y2])]
   );end-let
  );end-let

Code: [Select]
(defun  Letacad(variable-list values / $rr)
  (setq $rr "Here is AutoLisp.R14 or VisualLisp")
.......................
AlwaysRetrun x1)

Eg. (Letacad "x1 y1 x2 y2" (list 1 2 3 4))   OR
      (Letacad "x1,y1,x2,y2" (list 5 6 7 8))  OR
      (Letacad "x1,y1,x2,y2",nil)  -- ALL the variabiles set nil

 ???

The clojure is powered by Java(c). So I believe the all UsersAutoLisper~s  must known BasicallyClojure!!!
« Last Edit: October 30, 2021, 01:27:01 AM by d2010 »

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: [LISP] How to inject LET from clojure
« Reply #1 on: October 30, 2021, 02:57:39 AM »
Hi,
Have a look at this challenge.
Speaking English as a French Frog

baitang36

  • Bull Frog
  • Posts: 213
Re: [LISP] How to inject LET from clojure
« Reply #2 on: October 31, 2021, 10:51:49 AM »
In fact, vl.arx provides a function let. However, it is an undisclosed function. It can only be used in FAS, not in LSP. I wrote a small program that can be used after loading. But I don't know how to use this function.