mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
59333177cd
This commit implements list addition. A new list is allocated, and the contents of l1 and l2 are concatenated onto the list. This is done by extending the buffer template macro to support a `concat` operation, which given an `other` buffer, appends all elements of the `other` buffer to the end of the `self` buffer. Allocations are done as needed. We implement this additional operation, since the alternative would be to call `reserve()` for each `write()` operation, which doesn't seem ideal. Issue: #55 |
||
---|---|---|
.. | ||
import | ||
basics.pk | ||
controlflow.pk | ||
core.pk | ||
fibers.pk | ||
functions.pk | ||
import.pk | ||
toc.pk |