improve signature for last

This commit is contained in:
Scott Richmond 2025-07-06 17:55:48 -04:00
parent b4e97d9041
commit 1f9d4920c1
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.