On 05/11/2011, at 7:36 AM, john skaller wrote:

> 
> Solution 1, a temporary hack: change the list definition from
> 
>  union list[T] = | Empty | Cons of T * list[T];
> 
> to
> 
>  union list[T] = | Empty | Cons of list[T] * T;
> 
> This puts the pointer first in the node_t struct. Since we now know the 
> offset,
> the list reversal code becomes non-polymorphic.

But all uses change from

  Cons(elt, lst)

to 

Cons (lst, elt)

and that sucks because it breaks the convention for Cons (as well
as break all code using Cons). Adding a function to reverse the order
fixes construction but won't fly in pattern matches...


--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to