Guest User

Untitled

a guest
Oct 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. mergeFunc = x [Function] {Total[#], Union[Flatten@#2]} & @@ (x[Transpose]);
  2.  
  3. Merge[{<|"effect" -> {5, {2, 3}}|>, <|"effects" -> {4, {1, 3, 5}}|>}, mergeFunc]
  4.  
  5. Merge[{<|"effect" -> {5, {2, 3}}|>, <|"effect" -> {4, {1, 3, 5}}|>}, mergeFunc]
  6.  
  7. <|"effect" -> {5, {2, 3}}, "effects" -> {4, {1, 3, 5}}|>
  8.  
  9. <|"effect" -> {9, {1, 2, 3, 5}}|>
Add Comment
Please, Sign In to add comment