diff options
| author | 2022-08-14 07:25:40 +0200 | |
|---|---|---|
| committer | 2022-08-14 07:25:53 +0200 | |
| commit | f0def28d9aeeb7f1f9b3d8880a34a05ec59d80ed (patch) | |
| tree | 72b4f9776a8bc1964d32b3db2e8bf2d78120ad57 /src/vec.hff | |
| parent | 4a656bf19a45e0b3f553f9c518e7e842cc6cbf51 (diff) | |
multiline comment and stuff
Diffstat (limited to 'src/vec.hff')
| -rw-r--r-- | src/vec.hff | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vec.hff b/src/vec.hff index 9099b85..be29fec 100644 --- a/src/vec.hff +++ b/src/vec.hff @@ -33,6 +33,10 @@ struct Vec<T> { } return vec.dat[0::vec.len]; } + + fn last(vec *const Vec) T { return vec.dat[vec.len - 1]; } + + fn lastp(vec *Vec) *T { return &vec.dat[vec.len - 1]; } } defmacro vec_each(x, i, v, ...body) [ |