[Haskell-beginners] tuple space

Mike Houghton mike_k_houghton at yahoo.co.uk
Fri Feb 5 22:10:04 UTC 2016


Nice, thanks.

> On 5 Feb 2016, at 22:03, Tony Morris <tmorris at tmorris.net> wrote:
> 
> HList.
> 
> Also in Java, you'd use HList (never use Object).
> http://www.functionaljava.org/javadoc/4.0/fj/data/hlist/HList.html <http://www.functionaljava.org/javadoc/4.0/fj/data/hlist/HList.html>
> 
> On Sat, Feb 6, 2016 at 7:58 AM, Mike Houghton <mike_k_houghton at yahoo.co.uk <mailto:mike_k_houghton at yahoo.co.uk>> wrote:
> Thanks for the quick reply!
> 
> No, that wouldn’t work as that would tie a tuple to Int, Double,String for all tuples.
> 
> (1,1,2,3,”string”, 4.5, “string”, 1) is also valid tuple
> 
> In Java  I would use
> List<Object> so any number of (non-primitives) can be used.
> 
> Thanks
> 
> Mike
> 
> 
> > On 5 Feb 2016, at 21:43, Imants Cekusins <imantc at gmail.com <mailto:imantc at gmail.com>> wrote:
> >
> >> T = (1, ”A string”,  3.4)    i.e. an int, string and double.
> >
> > would this suit:
> >
> > data Object = Int' Int | Double' Double | String' String
> > type T = [Object]
> >
> > ?
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org <mailto:Beginners at haskell.org>
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners <http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners>
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org <mailto:Beginners at haskell.org>
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners <http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners>
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160205/1a667d60/attachment-0001.html>


More information about the Beginners mailing list