So this works now: var a1 = "Hell"; var a2 = 1,2; var a3 = extend a1 with a2 end; println$ a3; var a4 = extend a2 with a1 end; println$ a4; var a5 = extend 1 with "silly" end; println$ a5;
var x : extend int * long with double end; x = 1, 2L, 1.2; println$ x; It does NOT handle arrays yet. With some fiddling this is the "tuple cons" operation already, for both values and types. So we only need the "unpack" operation, either hd,tl functions or pattern match like ?hd ,, ?tl where ,, is hd+tail for tuples. Maybe syntax ?hd, ?tl ... would be nicer but issue here is just to get the operator. for both values and types. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language