slice2.demo 280 B

1234567891011121314
  1. zygo> a
  2. [8 4 1 7]
  3. zygo> (aset a 0 12)
  4. zygo> a
  5. [12 4 1 7]
  6. zygo> (assert (== %default (:99 a %default)))
  7. zygo> (:99 a %default) // get %default back if 99 is out-of-bounds
  8. default
  9. zygo> (append a [77 88])
  10. [12 4 1 7 [77 88]] // todo: needs append with ...
  11. zygo> a
  12. [12 4 1 7]
  13. zygo>