私はhaskellの光沢を初めて使用していますが、次のコードで問題が発生しています:
-- the initial c and l will be imagine for dimension 9: (-160) 160
-- (so the square ends in the center of the window
-- column; line; dimension
drawmap :: Float -> Float -> Float -> Picture
drawmap c l d = (drawline x c l d) : (drawmap xs c (l+40) d)
drawline :: Float -> Float -> Float -> Picture
drawline c l d = if (d>0) then (Translate c l $ Color red (circle 20)) : (drawline (c+40) l (d-1))
else (Translate c l $ Color red (circle 20))
私が今持っている唯一の質問は、[Picture] ではなくタイプ Picture である必要があるため、タイプに関するものです。
また、このストップポイントを作成するにはどうすればよいですか:
drawline _ _ 0 = Nothing or []
これが受け入れられないことはわかっていますが、サークルを停止するタイミングをどのように伝えることができますか?
これはまったく実用的ではありません。非常に単純な例にすぎません。誰かがこれを理解するのを手伝ってくれれば、本当に必要なことを後で適用できます。