On Wednesday, December 21, 2016 at 1:18:52 PM UTC, Peter Damoc wrote:
>
> shapeDecoder =
> field "@type" string
> |> andThen toShape
>
> toShape str =
> case str of
> "Circle" ->
> map CircleAsShape circleDecoder
> "Rectangle" ->
> map RectangleAsShape rectangleDecoder
> _ ->
> fail ("unknown shape: " ++ str)
>
Thanks guys. :-)
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.