improve signature for last
This commit is contained in:
parent
14d07e40de
commit
10236c5005
|
@ -141,10 +141,10 @@ fn rest {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn last {
|
fn last {
|
||||||
"Returns the last element of a list or tuple."
|
"Returns the last element of an indexed value: list, tuple, or string."
|
||||||
(xs) if indexed? (xs) -> base :last (xs)
|
(xs as :list) -> base :last (xs)
|
||||||
& (xs as :list) -> base :last (xs)
|
(xs as :tuple) -> base :last (xs)
|
||||||
& (xs as :tuple) -> base :last (xs)
|
(str as :string) -> base :last (str)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn inc {
|
fn inc {
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user