Home › Forums › kdb+ › Challenge 4 – World Cup › Re: Challenge 4 – World Cup
-
Hi Megan,
If all you want is to print these statements, you don’t necessarily need to cast the columns to symbols or save in a table. Try the following one-liner:
{x,” from “,y,” scored a goal in the “,z,”th minute”}./: flip(“***”;”;”) 0:`:goals.txt
By default this prints to the console, so I don’t see why you would need to include the “0N!” .
The reason you are getting a parse error on the “0N! each ” is because “0N!” is an infix function followed by a postfix iterator. You will have to wrap “0N! in parenthesis (see https://code.kx.com/q/basics/syntax/#prefix-infix-postfix). Also worth noting that “0N!/:” will work here as well. However, I think even this is unnecessary as “0N!” is unary and natively handles a list of strings.