Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Introduce langlib function count, first and last #39658

Closed
KavinduZoysa opened this issue Feb 20, 2023 · 1 comment · Fixed by #39667
Closed

[Improvement]: Introduce langlib function count, first and last #39658

KavinduZoysa opened this issue Feb 20, 2023 · 1 comment · Fixed by #39667
Assignees
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement

Comments

@KavinduZoysa
Copy link
Contributor

Description

Please check ballerina-platform/ballerina-spec#1135 (comment)

Describe your problem(s)

No response

Describe your solution(s)

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@KavinduZoysa KavinduZoysa added Type/Improvement Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. labels Feb 20, 2023
@KavinduZoysa KavinduZoysa self-assigned this Feb 20, 2023
@KavinduZoysa
Copy link
Contributor Author

KavinduZoysa commented Feb 20, 2023

// lang.value
# Returns the number of arguments.
function count(any|error...) returns int;
@typeParam
type Type any|error;
# Returns the first argument.
function first(Type, any|error..) returns Type;
# Returns the last argument.
function last(Type, Type...) returns Type;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant