Dang .. this works!
////
fun apply[t,n] (i:int,a:array[t,n]) => a.[i];
val x = 11,22,33,44;
println$ 2 x;
println$ x . 2;
var i = 1;
println$ i x;
println$ x . i;
/////
As you may know I recently simplified tuple access to
(1,2,3) . 1
i.e. you can select the i'th component by just writing . i,
but i has to be a literal integer. Used to be tuple.(i).
We now it seems, for read access anyhow, we can get rid of
the
a.[i]
notation for subscripting (at least for fetching).
--
john skaller
[email protected]
http://felix-lang.org
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language