This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
| import Graphics.Element exposing (..) | |
| import Graphics.Collage exposing (..) | |
| import Color exposing (..) | |
| import Mouse | |
| import Window | |
| import Time exposing (..) | |
| import Signal exposing (foldp) | |
| --Model |
| import Graphics.Element exposing (..) | |
| import Graphics.Collage exposing (..) | |
| import Color exposing (..) | |
| import Mouse | |
| import Window | |
| relativeMouse : (Int, Int) -> (Int, Int) -> (Int, Int) | |
| relativeMouse (origin_x, origin_y) (x, y) = | |
| (x-origin_x, origin_y - y) | |
| import Html exposing (Html, Attribute) | |
| import Html.Attributes | |
| import Html.Events | |
| import Signal exposing (Address) | |
| import List | |
| import String | |
| import StartApp | |
| ------------------ | |
| --- HELPER CODE -- |