Great answers. Thank you both very much. I think the docs, esp those related to
the elm architecture examples, could do with fleshing out this kind of stuff.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop
Great answers. Thank you both very much. I think the docs, esp those related to
the elm architecture examples, could do with fleshing out this kind of stuff.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop
This is a good explanation, Joey. I hope it's clear for Justin now.
When I started Elm I had same problems understanding what is what in type
declarations.
Let's summarize:
type X = A a | B | C | X
What do we have here:
we are defining a type named "X" and 4 special functions called type
construct
>
> But are Cmd/Sub/Html also types ?
They are type constructors. List Int is a type, but List is not a type.
It's a thing that makes a type when you give it a type. A type constructor!
What these are is types which take a parameter. In this case, the parameter
is the message type. For example,
Hi,
Looking at the following
http://elm-lang.org/examples/http
I pretty much grok this, but have a couple of (likely dumb) questions -
1) When a function returns 'Cmd Msg', or 'Sub Msg', or 'Html Msg', what
kind of a 'thing' is being returned ?
Obviously Msg is a type. But are Cmd/Sub/Html al