Home › Forums › kdb+ › Five easy pieces #4: Little Six › Re: Five easy pieces #4: Little Six
-
i think this is what you are after
q)f:{abs(til[x]div 2)-x#(x-1),0} q)f each 2*1+til 5 1 0 3 0 2 1 5 0 4 1 3 2 7 0 6 1 5 2 4 3 9 0 8 1 7 2 6 3 5 4
i cannot claim authorship