Hacker News new | past | comments | ask | show | jobs | submit login

Ick, good point. Since the fake set is a map, that should use key lookup?



Yes. Basically:

  for k := range s1 {
    if s2.Contains(k) {
      result.Add(k)
    }
  }




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: