I left out a combinator:

        BEXPR_aprj (expr, d,c)

This is an array projection. The BEXPR_prj (n,d,c) requires a constant n,
so is only useful for tuples, records, and structs.

The expression expr has to be a type which can index an array.
The most basic (and probably only) such type is:

        BEXPR_case (i,n)

i.e. a unit sum of n units (type "n") aka

        i modulo n

where the array bound is n. However if an array has a compact linear index type 
t,
then it can be accessed by a subscript of type t. For example a matrix

        T ^ 2 ^ 3

is an array of 3 pairs of T, which requires two projections. However it's 
isomorphic to

        T ^ (3 * 2)

so could be indexed by a tuple of type 3 * 2. Of course that tuple is compact 
linear
and so the index can be converted to type 6. In any case the index which is a 
tuple
could look like

        BEXPR_tuple [BEXPR_case (1,3); BEXPR_case (1,2)] // (1,1)



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




------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to