Sum and product puzzle: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: select) |
(→{{header|jq}}: works with jq) |
||
Line 1,426: | Line 1,426: | ||
=={{header|jq}}== |
=={{header|jq}}== |
||
'''Works with: jq''' |
|||
'''Works with: gojq''' (the Go implementation of jq) |
'''Works with: gojq''' (the Go implementation of jq) |
||
Line 1,450: | Line 1,452: | ||
# The stream of [x,y] pairs matching "P knows the product is $prod" |
# The stream of [x,y] pairs matching "P knows the product is $prod" |
||
def prodEq($ |
def prodEq($p): select( $p == prod ); |
||
## The solver: |
## The solver: |