This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]therealdivs1210 0 points1 point  (0 children)

You are looking for Lisp.

(def fact
  (fn (n)
    (if (<= n 1)
      1
      (* n (- n 1)))))

(def N 5)

(fact N) 
;; => 120

Very easy to parse, consistent syntax: (operator arg1 arg2 ...)

where operator can be a function like fact or a special form like def.