[Jprogramming] Truncating
Raul Miller
rauldmiller at gmail.com
Mon Mar 5 22:58:16 HKT 2007
On 3/5/07, Geoff Canyon <geoffc at inspiredlogic.com> wrote:
> out what is needed. As far as I can see these are equivalent:
>
> i.&.(p:^:_1)10000
> p:i.(p:^:_1)10000
>
> They take the same number of characters to type, so why is the former
> preferred to the latter?
It's almost a matter of personal taste -- and noticing the equivalence
is something very worthwhile -- but:
f1=: i.&.(p:^:_1)
f1 10000
vs.
f2=: [: p: [: i. p:^:_1
f2 10000
It's not just that f1 is a couple characters shorter than f2,
but I also kind of like that f1 required less translation.
Mind you, I didn't think this out when I answered your
earlier post -- I think I'm starting to build habits based
on tacit programming.
--
Raul
More information about the Programming
mailing list