{"id":2629,"date":"2015-09-17T12:48:17","date_gmt":"2015-09-17T12:48:17","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2629"},"modified":"2015-09-17T12:48:17","modified_gmt":"2015-09-17T12:48:17","slug":"scala-union-example","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/scala-union-example\/","title":{"rendered":"Scala union example"},"content":{"rendered":"<p>The scala union function is very simple &#8211; it takes one sequence on the end of another:<\/p>\n<pre lang=\"scala\">\nList(1, 2, 3).union(List(2, 3, 4))\n\nres33: List[Int] = List(1, 2, 3, 2, 3, 4)\n<\/pre>\n<p>Note however that this function is probably a poor naming choice &#8211; in both set theory and SQL, a &#8220;union&#8221; implies that you have computed a unique list of two lists of values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The scala union function is very simple &#8211; it takes one sequence on the end of another: List(1, 2, 3).union(List(2, 3, 4)) res33: List[Int] = List(1, 2, 3, 2, 3, 4) Note however that this function is probably a poor naming choice &#8211; in both set theory and SQL, a &#8220;union&#8221; implies that you have &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/scala-union-example\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Scala union example&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[480,482,488],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2629"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2629"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2629\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}