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)
    }
  }




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: