infix.session 314 B

1234567891011121314151617181920
  1. zygo> { a = 10 }
  2. 10
  3. zygo> { b = 12 }
  4. 12
  5. zygo> { a + b * 2 }
  6. 34
  7. zygo> { a + b * 2 / .5}
  8. 58
  9. zygo> (defn cube [x] (* x x x)) // or (defn cube [x] {x*x*x})
  10. zygo> a
  11. 10
  12. zygo> b
  13. 12
  14. zygo> cube
  15. (defn cube [x] (* x x x))
  16. zygo> (cube b)
  17. 1728
  18. zygo> { a + (cube b) ** 2} // L ** R means raise L to the power R.
  19. 2985994
  20. zygo>