improve signature for last

This commit is contained in:
Scott Richmond 2025-07-06 17:55:48 -04:00
parent 14d07e40de
commit 10236c5005
2 changed files with 4 additions and 4 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 {

Binary file not shown.