kdemo.fun 272 B

12345678910111213
  1. #import std
  2. #import nat
  3. #comment -[
  4. toy example of a self-describing algebraic expression represented by a
  5. tree of type %sfOZXT]-
  6. nterm =
  7. ('+',sum=>0)^: <
  8. ('*',product=>1)^: <('3',3!)^: <>,('4',4!)^: <>>,
  9. ('-',difference+~&hthPX)^: <('9',9!)^: <>,('2',2!)^: <>>>