To form a matrix consisting of identical rows, one could use
x:1 2 3
2 3#x,x
which produces (1 2 3i;1 2 3i)
as expected. However, attempting to generalise this thus:
2 (count x)#x,x
produces a type
error although the types are equal:
(type 3) ~ type count x
returns 1b
. Why doesn't this work?
The following should work.
If you look at the parse tree of both your statements you can see that the second is evaluated differently. In the second only the result of count is passed as an argument to #.