Home › Forums › kdb+ › Five easy pieces #2: getting around › Re: Five easy pieces #2: getting around
-
rnd:{[x;nd;m] string%[;s]((ceiling;floor;floor 0.5+)`up`dn`nr?m)@:x*s:10 xexp nd}
Here the case structure is not a dictionary, just a mapping from the symbols to functions. The primitives all iterate implicitly: the Each Left
:
is used only to support multiple rounding modes.In the list of unary functions the third item
floor 0.5+
is an implicit composition of two unaries:floor
and the projection0.5+
.