# Answer Question

### Convert an abstract line into a CodeWorld Picture, by pattern matching against the Line Shape.

**NOTE:**This question is about CodeWorld Haskell (http://code.world/haskell).Line has already been defined as a constructor for Shape. I am supposed to make a function that converts a Line given two points into a picture using pattern matching. I have to then enter an expression into my Haskell compiler:

`drawingOf (shapeToPic (Line (0, 0) (1, 1)))`

and this will give me a picture of a line from the coordinates.

`data Shape = Line Point Point`

My thinking is like

`shapeToPicture :: Shape -> Picture`

shapeToPicture = polyline(Line)

where i have to somehow define the line as points.

Then I'm confused with do i have to redefine line? like

`myLine :: Point -> Point -> Shape`

myLine a b c d = (a,b), (c, d)

I have confused my self too much.

Any help will be greatly appreciated.