-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Working code examples required
Fistly this is a great read and "Thinking Algebraiclly WIth Elm" only decent text I've found on GraphicSVG and Elm .
I have found a problem with the code examples, (no import statements) I understand why, page space is limited. This does nothing for the reader. Do you think a future link to working code will be included?
What I found
Going through the examples in Ch5 and even the simplest of examples at P31 require you to understand and dig through the APIs to work out the import statements.
So instead of:
-- CH5, P30
main = graphicsApp { view = view }
view = collage 300 300 []
readers need the following:
-- CH5, P30 working example
module Main exposing (main)
import GraphicSVG exposing (circle, collage, filled, red, scale)
import GraphicSVG.App exposing (graphicsApp)
-- MAIN
main =
graphicsApp { view = view }
-- VIEW
view =
collage 300
300
[ circle 25
|> filled red
]
I've left the spacing in using elm-format to give you an idea of how the formatter displays the code. Working code examples help. Code comprehension and presentation go hand in hand.
Metadata
Metadata
Assignees
Labels
No labels