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

Syntax sugar for function type and rest arguments #49

Open
mhagmajer opened this issue Jun 4, 2020 · 0 comments
Open

Syntax sugar for function type and rest arguments #49

mhagmajer opened this issue Jun 4, 2020 · 0 comments
Labels
AskScript ./src/askscript/** enhancement New feature or request first-timers-only good first issue Good for newcomers help wanted Extra attention is needed type:syntax related to syntax or syntax sugar
Milestone

Comments

@mhagmajer
Copy link
Contributor

mhagmajer commented Jun 4, 2020

Example 1
(int, int) -> int

const sum2: (int, int) -> int = fun (a:int, b:int) { a + b }
const sum2: fun(int, int, int) = fun (a:int, b:int) { a + b }

Example 2
(...array(int)) -> int

const sumN: (...array(int)) -> int = fun (...args:array(int)) { sum(args)) }
const sumN: fun(array(int), true) = fun { sum(resources:at('args')) }

where fun is the function type constructor introduced by #42.

@mhagmajer mhagmajer added enhancement New feature or request AskScript ./src/askscript/** labels Jun 4, 2020
@mhagmajer mhagmajer added this to the v1.2 milestone Jun 4, 2020
@mhagmajer mhagmajer linked a pull request Jun 4, 2020 that will close this issue
1 task
@mhagmajer mhagmajer changed the title Syntax sugar for function type Syntax sugar for function type and rest arguments Jun 4, 2020
@mhagmajer mhagmajer added the good first issue Good for newcomers label Jun 4, 2020
@mhagmajer mhagmajer removed this from the v1.2 milestone Jun 21, 2020
@czerwinskilukasz1 czerwinskilukasz1 added this to the v1.4 milestone Jul 1, 2020
@czerwinskilukasz1 czerwinskilukasz1 added the type:syntax related to syntax or syntax sugar label Jul 3, 2020
@czerwinskilukasz1 czerwinskilukasz1 modified the milestones: v1.4, v1.5 Jul 8, 2020
@czerwinskilukasz1 czerwinskilukasz1 added help wanted Extra attention is needed P2 first-timers-only and removed P2 labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AskScript ./src/askscript/** enhancement New feature or request first-timers-only good first issue Good for newcomers help wanted Extra attention is needed type:syntax related to syntax or syntax sugar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants