# difference

function

##
`algebra.difference(a, b)`

Returns a set that represents the difference of sets *A* and *B* (*A* \ *B*), or
returns if a difference exists.

```
algebra1 = new set.Algebra(set.props.boolean("completed"));
algebra2 = new set.Algebra();
// A has all of B
algebra1.difference( {} , {completed: true} ) //-> {completed: false}
// A has all of B, but we can't figure out how to create a set object
algebra2.difference( {} , {completed: true} ) //-> true
// A is totally inside B
algebra2.difference( {completed: true}, {} ) //-> false
```

### Returns

`{Set|Boolean}`

:

If an object is returned, it is difference of sets *A* and *B* (*A* \ *B*).

If `true`

is returned, that means that *B* is a subset of *A*, but no set object
can be returned that represents that set.

If `false`

is returned, that means there is no difference or the sets are not comparable.