Is it possible to access a specific piece of a custom data type in Haskell?

Published: 5/10/2017
Is it possible to access a specific piece of a custom data type in Haskell?
Source: STACKOVERFLOW.COM

I'm very new to haskell, and functional programming in general, I'm switching back and fourth between two different books on haskell, but I can't seem to find an answer to my question. Say I have a custom datatype like the one below data Expr = Let String Expr Expr | Binary BinOp Expr Expr | Unary UnOp Expr | Literal Literal | Var String and I have an instance of this data type that is in the f

Read more
Related news
Comment