[elm-discuss] Re: The way forward for Elm Arrays

2017-06-11 Thread Evan
Oh, and a few more notes. I recently did two pull requests on a framework comparison benchmark to improve the Elm implementation: - Start using lazy - This made the Elm version significantly faster than before. - Get rid

[elm-discuss] Re: The way forward for Elm Arrays

2017-06-11 Thread Evan
Very interesting, thank you for sharing! I wanted to add a couple notes and ideas that I've had separately. Syntax I was formerly somewhat keen on having special syntax for other collections. For example, OCaml allows you to say [| 1, 2, 3 |] to create an array. Hassan made a really nice

[elm-discuss] The way forward for Elm Arrays

2017-06-11 Thread Robin Heggelund Hansen
I've been doing some thinking on how to improve Arrays in Elm. The result of that thinking have been written down in this document: https://docs.google.com/document/d/1Z8IC5qk98ISQLP_xKXNOHScCfzkQ8jCVSiYd1SxObB4/edit?usp=sharing The document is quite large, but most of it are benchmark results

[elm-discuss] Re: Cascading ul and li with onClick

2017-06-11 Thread Andrejs Mogilevcevs
You need to refactor your HTML markup. Instead of setting onClick on a li element, you set it on a child element. E.g.: ul [] [ li [] [ text "driver 1" ] , li [] [ span [ onClick (Crumple "driver 2"] [ text "driver 2" ] , ul [] [ li [] [

[elm-discuss] Cascading ul and li with onClick

2017-06-11 Thread David Legard
I use cascading lists of ul and li elements (nodes) to create a navigation tree menu. I keep a list of which nodes are open in my model, and when I click on a node, I toggle its presence in the list of open nodes. I can then display or hide relevant nodes depending on whether they are open or