Is it possible to evaluate the product-sum of two lists in this way?
Yes.
Let's start with chaining:
One can write Raku code that chains right-to-left but we'll stick with left-to-right.
A left to right English reading of what you're calling "product sum" would be "sum of products of elements of these lists". So we want sum on left, product next, lists last.
There is a built in sum but no built in product, so we need to deal with the latter. One way is to write [Z*] as a reduction (which means it has to appear on the left of the lists it reduces over). Another is to write a new product function.
Putting the above together, here are some of the ways we can write a "product sum":
say [+] [Z*] @a, @b; # 50 (closest to what it seems you want)
say sum [Z*] @a, @b; # 50 (`sum` is idiomatic)
say sum zip :with(&[*]), @a, @b; # 50 (some prefer `zip :with(&[*])` over `[Z*]`)
say sum product @a, @b; # 50 (requires a user defined `sub`)
sub product (|lists) { zip :with(&[*]), |lists }
Doing it as above means you can use any number of lists rather than just two.
If you really want to stick with infix notation, which limits you to two lists, you can do that for the product part:
say [+] @a Z* @b; # 50 (using infix sequential shallow zip metaop)
say [+] @a >>*<< @b; # 50 (using infix parallel nesting hyper metaop)
say sum @a Z* @b; # 50 (replacing `sum` with `[+]` reduction)
say sum @a >>*<< @b; # 50
What's happening across the different chained variants to cause results like 6, (10), (30) and 125?
Raku is correctly doing what your code expresses.
The following code examples explain all the code/results @Zaid shared. You (any reader, not just @Zaid) may have to do some work to understand why; if you can't work out how these examples explain one or more of Zaid's results, please comment and I'll be happy to explain in a comment and/or update this answer and will thank you for your question/comment.
say my @a = 2...6; # [2 3 4 5 6]
say my @b = 5...1; # [5 4 3 2 1]
say [+] [5,4,3,2,1]; # 15
# Same as:
say sum @b; # 15
say 2 Z* 15; # (30)
# zip stops once shortest list exhausted, so same as:
say [2,3,4,5,6] Z* 15; # (30)
say +@b; # 5
# `+` coerces argument(s) to number, so short for:
say elems @b; # 5
# Same as:
say elems [5,4,3,2,1]; # 5
say 2 Z* 5; # (10)
#say +foo; # Error while compiling: Undeclared ... foo
# Same effect as:
#say foo; # Error while compiling: Undeclared ... foo
say [Z*] @b; # (120)
# Same as:
say 5 Z* 4 Z* 3 Z* 2 Z* 1; # (120)
say @a [Z*] 5; # (10)
# square brackets redundant, and
# zip stops once shortest list exhausted, so same as:
say 2 Z* 5; # (10)
say [+] @a >>*<< @b; # 50
say [>>*<<] @b; # 120
# hypers redundant if both args scalars, so same as:
say [*] [5,4,3,2,1]; # 120
# (5 * 4 * 3 * 2 * 1)
say @a [+] [>>*<<] @b; # 125
# square brackets round infix `+` redundant, so same as:
say @a + [>>*<<] @b; # 125
# hypers redundant if both args scalars, so same as:
say 5 + [*] @b; # 125 (5 + 120)
say @a [>>*<<][+] @b; # Same as:
say @a [>>*<<] [+] @b; #
say @a [>>*<<] sum @b; #
say @a >>*<< sum @b; #
#say @a >>*<< 15; # Lists on either side ... not of the same length