wumpus-drawing-0.1.0: High-level drawing objects built on Wumpus-Basic.




Generate points in an iterated chain.

** WARNING ** - unstable. Names are not so good, also Wumpus-Basic has a chain1 operator...



type Chain u = [Point2 u]Source

A Chain is a list of points. The list is often expected to be inifinte, but if it was a Stream it would loose the ability to use list comprehensions.

type LocChain u = Point2 u -> Chain uSource

A LocChain is a function from a starting point to a Chain.

unchain :: Int -> LocGraphic u -> Chain u -> TraceDrawing u ()Source

Note - commonly a Chain may be infinite, so it is only unrolled a finite number of times.

zipchainWith :: (a -> LocGraphic u) -> [a] -> Chain u -> TraceDrawing u ()Source

unchainTD :: Int -> (Point2 u -> TraceDrawing u ()) -> Chain u -> TraceDrawing u ()Source

Variant of unchain where the drawing argument is a TraceDrawing not a LocGraphic.

zipchainWithTD :: (a -> Point2 u -> TraceDrawing u ()) -> [a] -> Chain u -> TraceDrawing u ()Source