Open trombonehero opened 9 years ago
It would be very useful to be able to slice things like lists (er, arrays) and strings:
base_name = texfile_name[:-3]; aux = file(base_name + '.aux'); pdf = file(base_name + '.pdf'); accumulate = function(xs:list[int], op:(int,int)=>int, init:int) if xs.empty init else accumulate(xs[1:], op, xs[0] + init) ;
Note that the last bit would be greatly enhanced by #5 (generic programming)!
Of course, we could also get the same effect on the first example by providing fields à la Issue #7 ...
Since issue #7 is closed, maybe we can get away with just matching on head + the rest...
It would be very useful to be able to slice things like lists (er, arrays) and strings:
Note that the last bit would be greatly enhanced by #5 (generic programming)!