On Fri, 17 Nov 2006 20:04:22 +0100, Steve Schafer <[EMAIL PROTECTED]>
wrote:
myList = [(Integer 42), (Character 'a'), (Float 3.14159)]
You can leave out the parentheses, making even simpler:
myList = [Integer 42, Character 'a', Float 3.14159]
--
Met vriendelijke groet,
Henk-Jan van Tuyl
On Fri, 17 Nov 2006 18:36:30 +0100, you wrote:
>But I need something which is heterogeneous and non-fixed length. I'm
>used do Java, and this switch to functional languages is very strange to
>me. So, to be clear, I need something like LinkedList in java.
In an attempt to leverage your existing
On 17.11.2006 19:08 Donn Cave wrote:
On Fri, 17 Nov 2006, Valentin Gjorgjioski wrote:
...
But I need something which is heterogeneous and non-fixed length. I'm
used do Java, and this switch to functional languages is very strange to
me. So, to be clear, I need something like LinkedList in ja
i have cut-and-pasted the last few postings into the wiki:
http://haskell.org/haskellwiki/Heterogenous_collections
it'is very ad hoc, but i hope it helps those who bump into it a
little. and it's easier to edit and improve than a mailing list
thread. (-:
matthias
signature.asc
Description:
Depending on your needs and your comfort level with fancier types, the
existential approach to ADTs might solve your problem. The following
code is a demonstration you can cut-and-paste-and-run.
This is example akin to upcasting in Java to an interface that lets
you print things. That way you kno
On Nov 17, 2006, at 12:36 PM, Valentin Gjorgjioski wrote:
Is some kind of collection of object with different types in
Haskell exist? Except the tuples, which have fixed length.
I find this
* Tuples heterogeneous, lists homogeneous.
* Tuples have a fixed length, or at least their lengt
On Fri, 17 Nov 2006, Valentin Gjorgjioski wrote:
> Is some kind of collection of object with different types in Haskell exist?
> Except the tuples, which have fixed length.
> I find this
>
>* Tuples heterogeneous, lists homogeneous.
>* Tuples have a fixed length, or at least their length
On Fri, 17 Nov 2006, Valentin Gjorgjioski wrote:
...
> But I need something which is heterogeneous and non-fixed length. I'm
> used do Java, and this switch to functional languages is very strange to
> me. So, to be clear, I need something like LinkedList in java.
I looked in a couple of on-line
this is not exactly what you are looking for, but it contains a link
to HList:
http://www.haskell.org/haskellwiki/Extensible_record
and then there is the follow-up work to HList, an OO library written
in Haskell:
http://homepages.cwi.nl/~ralf/OOHaskell/
it's quite a challenging read if yo
On 11/17/06, Valentin Gjorgjioski <[EMAIL PROTECTED]> wrote:
But I need something which is heterogeneous and non-fixed length.
You're looking for HList:
http://homepages.cwi.nl/~ralf/HList/
Kurt
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
10 matches
Mail list logo