Quantcast
Channel: understanding data type in haskell - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Zeta for understanding data type in haskell

In order to return Either a b, you have to use either Left y or Right x, where y :: a and x :: b. You correctly used Left "...." and Right in all but the last pattern:data NestedList a=Elem a | List...

View Article



understanding data type in haskell

I am a haskell new bee. I can't just wrap my head around what is going on here data NestedList a=Elem a | List [NestedList a] deriving Show append::NestedList a->NestedList a->Either String...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images