[Jprogramming] Tacit vs. Explicit
Raul Miller
rauldmiller at gmail.com
Fri Oct 7 18:19:44 HKT 2011
2011/10/7 Linda Alvord <lindaalvord at verizon.net>:
> Is there a way to go from a tacit expression to find the correct explicit
> expression?
>
> a =: 13 :'((+/ % #) * 1 + #) - +/'
> a 90 90 90
I think you want:
A=: 3 :'(((+/ % #) * 1 + #) - +/) y'
But of course, there are many other equivalent explicit expressions.
For example:
(((+/ % #) * 1 + #) - +/) Y=: 90 90 90
90
(((+/ % #) * 1 + #)Y) - +/ Y=:90 90 90
90
(((+/ % #)Y) * 1 + #Y) - +/ Y=:90 90 90
90
(((+/Y) % #Y) * 1 + #Y) - +/ Y=:90 90 90
90
This suggests:
expr=:3 :0
sum=. +/y
cnt=. # y
((sum % cnt) * 1 + cnt) - sum
)
But, of course, the introduction of meaningful variable names requires
an engaged reader.
--
Raul
More information about the Programming
mailing list