This is the procedural logic I want to program in Elisp:
def my_func(): v1; v2; if (some_condition): v1 = 2 v2 = 3 else: v1 = 4 v2 = 5 foo(v1) bar(v2) ... # Possibly many other lines of code. I have this in Elisp:
(defun my_func () (if some_condition (let ((v1 2) (v2 3)) (foo v1) (bar v2)) (let ((v1 4) (v2 4)) (foo v1) ; This block of code is duplicated and could be very long. (bar v2)))) What is the Llisp way of programming the logic shown above? That is, I have a few variables at the start of my function that can take some values depending on some condition, then the rest of the function goes on.
some-condition...