improve signature for last

Former-commit-id: 10236c5005
This commit is contained in:
Scott Richmond 2025-07-06 17:55:48 -04:00
parent d8cf28b62c
commit 0da80cff22
2 changed files with 6 additions and 6 deletions

View File

@ -141,10 +141,10 @@ fn rest {
}
fn last {
"Returns the last element of a list or tuple."
(xs) if indexed? (xs) -> base :last (xs)
& (xs as :list) -> base :last (xs)
& (xs as :tuple) -> base :last (xs)
"Returns the last element of an indexed value: list, tuple, or string."
(xs as :list) -> base :last (xs)
(xs as :tuple) -> base :last (xs)
(str as :string) -> base :last (str)
}
fn inc {

BIN
pkg/rudus_bg.wasm (Stored with Git LFS)

Binary file not shown.