Hacker News new | ask | show | jobs
by tgv 364 days ago
A normal tree would be easier to read

            eq
       mul      pow
     a    a    a   2
1 comments

Turned 90, maybe?

  eq:
    mul:
      a
      a 
    pow:
      a
      2
That's the classical LISP way of doing it:

    (eq (mul a
             a)
        (pow a
             2))
or

    (eq
        (mul
             a
             a
        )
        (pow
             a
             2
        )
    )
x*x == pow(x,2)
We have a winner!

Actually, I'd suggest a slight improvement: x*x = x^2

x · x = x²
(== (* x x) (pow x 2))
(= * x x ^ x 2)
no yaml programming please :(
From the YAML inventor himself: https://yamlscript.org/

The length people go to avoid Lisp, only to reinvent it, badly.