Fix mistake in HW3.

This commit is contained in:
Danila Fedorin 2019-02-01 20:44:12 -08:00
parent 7fd2274873
commit 1b4656a099

View File

@ -52,7 +52,7 @@ nixMacro = Define "nix" [ "x", "y", "w", "h" ]
steps :: Int -> Prog
steps n = base ++ stepList
where
base = [ Pen Up, Move (Number 0) (Number 0) ]
base = [ Pen Up, Move (Number 0) (Number 0), Pen Down ]
stepList = [1..n] >>= (\i -> [ Move (Number (i -1)) (Number i), Move (Number i) (Number i) ])
prettyPrintExpr :: Expr -> String