# Check an expense against the policy

Check an expense against your policy. `find` pulls the rule. `decide` says whether the expense fits.

*The rule find pulled prints beside the answer. The $60 dinner fits the $75 meal rule.*

```
expense='Client dinner, $60 a head'
covers="Which rule covers: $expense"
allows="Does this rule allow: $expense"

cat <<'EOF' |
Meals with a client: up to $75 a head.
Flights: economy only, booked 14 days out.
Software: needs a manager's approval.
EOF
thinkthen find "$covers" |
thinkthen decide "$allows" --lines |
jq .
```

*Output*

```
{
  "input": "Meals with a client: up to $75 a head.",
  "value": true
}
```

*exit 0*

## The functions it uses

- [find](/functions/find/): Pick the one line that best answers a question.

- [decide](/functions/decide/): Answer one yes or no question about the evidence.

On GitHub: [github.com/botassembly/thinkthen](https://github.com/botassembly/thinkthen)
