Quantcast
Channel: Datatypes that are represented by a choice of one of many other datatypes - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Cactus for Datatypes that are represented by a choice of one of...

data Card = ActionCard | BasicCard | BombCardThis creates a new datatype Card with three constructors called ActionCard, BasicCard and BombCard. This has nothing to do with the other two datatypes that...

View Article



Datatypes that are represented by a choice of one of many other datatypes

I am attempting to generate a deck for a toy implementation of Exploding Kittens.Say I had the following types:data ActionCard = Skip | Attack | Shuffle | Nope | Future | Defuse | Favor deriving...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>