Skip to content

Instantly share code, notes, and snippets.

@anderseknert
Created September 20, 2023 12:47
Show Gist options
  • Save anderseknert/1e85f8dde697a7b19480a32d308ab7b5 to your computer and use it in GitHub Desktop.
Save anderseknert/1e85f8dde697a7b19480a32d308ab7b5 to your computer and use it in GitHub Desktop.
Multiple outputs
package play
import future.keywords.if
import future.keywords.in
# Both of the conditions could be true
validate_user(user) := "valid" if "admin" in user.roles
validate_user(user) := "invalid" if not user.email
valid := validate_user(input.user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment