summaryrefslogtreecommitdiff
path: root/utils.go
diff options
context:
space:
mode:
authorNikolaus Gotsche <n@softwarefools.com>2019-05-14 12:32:45 +0200
committerNikolaus Gotsche <n@softwarefools.com>2019-05-14 12:32:45 +0200
commit0c4c5ac1ba534425716c80d27dc72817718f0367 (patch)
tree109d394c83b48197abaf9a44f88238c8af7283ca /utils.go
parentbf7dfda3e67f67687109290209c8b09576a417fd (diff)
Payment Debug, Yearly Analysis0.4.4
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils.go b/utils.go
index 9e59d75..5b5be5a 100644
--- a/utils.go
+++ b/utils.go
@@ -309,6 +309,16 @@ func isElement(some int, group []int) bool {
return false
}
+func AddNewElement(base, news []int) (out []int) {
+ out = base
+ for _,e := range news {
+ if !isElement(e,base) {
+ out = append(out,e)
+ }
+ }
+ return
+}
+
func removeItems(master, rem []int) []int {
var out []int
for _, v := range master {