<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bamch0h</author_name>
  <author_url>https://blog.hatena.ne.jp/bamch0h/</author_url>
  <blog_title>bamchoh’s diary</blog_title>
  <blog_url>https://bamch0h.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Goで配列の順列組み合わせを列挙するプログラムを書いているときに、 配列のサイズが大きくなると、同じパターンが列挙されてしまって ちゃんと動かないという問題が発生した。 結論としては、appendの仕様を間違って理解していたために 同じSliceに対して処理をしてしまって、間違った挙動になっていた というのがオチだった。 問題のソースは以下の通り package main import ( &quot;fmt&quot; ) func remove(a []int, i int) []int { o := make([]int, 0) for j := 0; j &lt; len(a); j++ { if j == i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbamch0h.hatenablog.com%2Fentry%2F2019%2F11%2F17%2F024434&quot; title=&quot;GoのSliceでハマった話 - bamchoh’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-11-17 02:44:34</published>
  <title>GoのSliceでハマった話</title>
  <type>rich</type>
  <url>https://bamch0h.hatenablog.com/entry/2019/11/17/024434</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
