Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. trace :: String -> Float -> Colour -> [ColouredLine]
  2. trace (x:xs) angle colour
  3. = ((0,0), fst(move x ((0,0), 0) angle), colour) ++ createList ((0,0), 0)
  4. where
  5. createList :: TurtleState -> String -> [ColouredLine]
  6. createList ((a,b), c)
  7. | xs == [] = ((a,b), (fst (newState)), colour)
  8. | otherwise = ((a,b), (fst (newState)), colour) ++ createList newState xs
  9. where
  10. newState = move x ((a,b), c) angle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement