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

Generics #28

Merged
merged 2 commits into from
Mar 20, 2024
Merged

Generics #28

merged 2 commits into from
Mar 20, 2024

Conversation

KacperFKorban
Copy link
Owner

@KacperFKorban KacperFKorban commented Mar 19, 2024

Add basic support or generic types

e.g.

def greetMaybeName(maybeName: Option[String]): String =
  maybeName.fold("Hello!")(name => s"Hello, $name!")

@main
def run =
  guinep.web(greetMaybeName)

No support for generic functions yet. Also, generics with undecidable type params are not supported yet.

closes #24

@KacperFKorban KacperFKorban merged commit 742883d into main Mar 20, 2024
1 check passed
@KacperFKorban KacperFKorban deleted the generics branch March 20, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support generics
1 participant