Arc Forumnew | comments | leaders | submitlogin
5 points by pg 6275 days ago | link | parent

Good heavens.

Infix -> prefix is pretty easy to write. I probably already have several times. I could add a lib fn if there was demand for it.



2 points by croach 6273 days ago | link

No, please don't add a library function for infix operations. I don't think it adds anything to the language other than clutter, and it becomes basically a crutch for those new to lisp that will just make it harder for them to transition to the lisp way of thinking.

-----

3 points by almkglor 6273 days ago | link

  (/ (- (sqrt (- (* b b) (* 4 a c))) b) (* 2 a))

  (nfx ((sqrt (b * b - 4 * a * c)) - b) / (2 * a))

-----

2 points by almkglor 6275 days ago | link

Make it a macro form:

  (nfx x = 1 + 2 - 3)

-----