On 10/08/2014, at 9:53 AM, srean wrote:

> Yeah bad example on my part because it was too simple. What I had in mind is 
> a recursive definition of an array v
> 
> v[t+1] = f( v[t] ) and a base case, the t is not an integer but the type (I 
> dont know what it is called). Then I do a 
> 
> val v = create_v[42]( ); 

Ah, ok, that clarifies it. Actually you SHOULD be able to do something like 
this for tuples
in the instantiator. you'd probably have to work backwards though so you 
terminate
when you "run out" of slots.

However at the moment the t + 1 can't be done.

I have had some fights with that. The problem is that

        2 + 1 \ne 3

They're isomorphic but not equal.

In felix 3 is a discrete set of 3 values with NO operations except equality.
I could change that to make 3 a cyclic group (but then we lose error
detection). The cyclic group would actually be great for calculating the
determinant of a matrix, no need to worry about wrap around.

In ATS, 3 is a singleton type like the set {3}, i,.e with 1 element, 3,
rather than a subrange of int  This is easier to work with, since the type
calculations can just be the same as integers.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to