Hi,
I've recently tried doing a project in Elm (
http://github.com/hyphz/StrikeGen if you're interested) and have a couple of questions I'd like to ask:
1) Is there any function for setting/updating a field in a record, similar to the .x functions for accessing fields? It's very awkward that in order to pass an updater to a higher order function I have to write (\newvalue, structure -> {structure | field = newvalue}) and because the field name is a syntax token I potentially have to rewrite this for every field.
2) Is there any version of case with the C++ fall-through behavior for occasions when accumulated results are desirable?
3) Is there any way to a) default a field in a record, or b) read a common field from a tagged union type?
4) I would like to have a document created in Elm be viewable with zoom+pan in HTML. There is the jQuery.panzoom library that can do this but a) is it going to interfere with Elm's DOM differ and b) to initialize it I need to send a port command to JS immediately after the view is displayed for the first time (otherwise the DIV will not exist - I can't just embed the elm in that DIV because there is a second DIV which should not zoom+pan) - is there a way of doing this? Will a command in init be sent at that point?
Mark