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

Product type #50

Open
xgrommx opened this issue Sep 26, 2016 · 1 comment
Open

Product type #50

xgrommx opened this issue Sep 26, 2016 · 1 comment

Comments

@xgrommx
Copy link

xgrommx commented Sep 26, 2016

Hello @paldepind How can I implement Product type in union-type? Smth like var Tuple3 = daggy.tagged('x', 'y', 'z') in daggy.

@xgrommx xgrommx changed the title Sum type Product type Sep 26, 2016
@glebec
Copy link

glebec commented Feb 20, 2018

@xgrommx years later…

There is no distinct product type, but you can fake it with a sum of only one tag.

const Tuple3 = Type({ Tuple3: [Number, Number, Number] })
const t3 = Tuple3.Tuple3(1, 2, 3)

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

No branches or pull requests

2 participants