mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 12:56:46 +00:00
Add basic tests for DiffSect function
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
// diffsect removes all items in `a` from `b`, then removes all items from `b`
|
||||
// DiffSect removes all items in `a` from `b`, then removes all items from `b`
|
||||
// which are not in `c`. Effectively: intersect(difference(b, a), c)
|
||||
func diffsect(a, b, c *[]string) *[]string {
|
||||
func DiffSect(a, b, c *[]string) *[]string {
|
||||
result := []string{}
|
||||
mapA := map[string]bool{}
|
||||
mapC := map[string]bool{}
|
||||
|
||||
Reference in New Issue
Block a user