Re: [elm-discuss] Pattern matching on aliased types

2016-10-12 Thread Wouter In t Velt
Op dinsdag 11 oktober 2016 23:35:27 UTC+2 schreef Duane Johnson: > > toString is a bit magical in Elm, and can convert any type to a string. > Also note that if you apply toString to something that is already a String, it will add double quotes at the start and end. -- You received this

Re: [elm-discuss] Pattern matching on aliased types

2016-10-11 Thread Duane Johnson
On Tue, Oct 11, 2016 at 7:36 AM, Ethan Martin wrote: > How does one check against a List containing a certain type? For instance, > I only want to map all elements of a string through the toString function > if that list does not already contain strings. The end result

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Joey Eremondi
> > Or are String and Int on "type MyType = String | Int" just tags? Yes, exactly! On Fri, Jun 3, 2016 at 2:53 PM, Lambder wrote: > Or are String and Int on "type MyType = String | Int" just tags? > > > On Friday, 3 June 2016 22:50:34 UTC+1, Lambder wrote: >>

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Lambder
Or are String and Int on "type MyType = String | Int" just tags? On Friday, 3 June 2016 22:50:34 UTC+1, Lambder wrote: > > I still like to ask for some clarification. > > type MyType = String | Int > > is legal type definition in elm. How to define function which accept one > parameter of type

Re: [elm-discuss] Pattern matching on aliased types

2016-06-03 Thread Lambder
I still like to ask for some clarification. type MyType = String | Int is legal type definition in elm. How to define function which accept one parameter of type MyType and if it is String return it with 'x' appended as a result. If it is a number return its increment? If what I am asking