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

Add union type support #45

Open
nsensfel opened this issue May 16, 2024 · 0 comments
Open

Add union type support #45

nsensfel opened this issue May 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request fate Issues relating to the Fate language

Comments

@nsensfel
Copy link
Owner

(declare_union #item
   (weapon #weapon)
   (armor #armor)
   (consumable #consumable)
   nothing
)
   (lambda ((#item i))
      (switch i
         ((weapon w) (eval is_sword w))
         ((armor a) (false))
         ((consumable a) (false))
         (nothing (false))
      )
   )
@nsensfel nsensfel added enhancement New feature or request fate Issues relating to the Fate language labels May 16, 2024
@nsensfel nsensfel added this to the Future Version milestone May 16, 2024
@nsensfel nsensfel self-assigned this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fate Issues relating to the Fate language
Projects
None yet
Development

No branches or pull requests

1 participant