Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trace :: String -> Float -> Colour -> [ColouredLine]
- trace (x:xs) angle colour
- = ((0,0), fst(move x ((0,0), 0) angle), colour) ++ createList ((0,0), 0)
- where
- createList :: TurtleState -> String -> [ColouredLine]
- createList ((a,b), c)
- | xs == [] = ((a,b), (fst (newState)), colour)
- | otherwise = ((a,b), (fst (newState)), colour) ++ createList newState xs
- where
- newState = move x ((a,b), c) angle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement