Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is using haskell For Problem 2, we'll use a List type constructor modified from lecture: It uses Lnode and LNil as constructors (to avoid
this is using haskell
For Problem 2, we'll use a List type constructor modified from lecture: It uses Lnode and LNil as constructors (to avoid name clashes with trees later) and omits Show from any deriving clause. (We'll be implementing show ourselves.) data List a - Node a (List a) | Nil deriving (Eq)--No deriving (Show) 2. (6 points) Mimic the missing show routine by writing a list Show x routine that returns the exact same string show x would return. (For testing purposes, add deriving ....Show) and verify that list Show x - Show x.) You can assume that the type of x is "simple" in the sense that it's not a data type. (So no X :: List (List Int) values.) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started