{"id":2590,"date":"2015-09-14T11:49:09","date_gmt":"2015-09-14T11:49:09","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2590"},"modified":"2015-09-14T11:49:09","modified_gmt":"2015-09-14T11:49:09","slug":"scala-example-concatenating-two-lists","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/scala-example-concatenating-two-lists\/","title":{"rendered":"Scala ++ example (concatenating two lists)"},"content":{"rendered":"<p>The ++ operator lets you concatenate two lists:<\/p>\n<pre lang=\"scala\">\nList(1, 2, 3) ++ List(4, 5, 6)\n\nres59: List[Int] = List(1, 2, 3, 4, 5, 6)\n<\/pre>\n<p>This also works as expected with option classes:<\/p>\n<pre lang=\"scala\">\nList(1,2,3) ++ Some(4)\nres60: List[Int] = List(1, 2, 3, 4)\n\nList(1,2,3) ++ None\nres62: List[Int] = List(1, 2, 3)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The ++ operator lets you concatenate two lists: List(1, 2, 3) ++ List(4, 5, 6) res59: List[Int] = List(1, 2, 3, 4, 5, 6) This also works as expected with option classes: List(1,2,3) ++ Some(4) res60: List[Int] = List(1, 2, 3, 4) List(1,2,3) ++ None res62: List[Int] = List(1, 2, 3)<\/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,487],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2590"}],"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=2590"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2590\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}