<commit_before>package com.wbillingsley.handy

case class Ids[T, K](ids: Seq[K]) {

  def lookUp(implicit lu: LookUp[T,K]) = lu.many(this)

}

case class UntypedIds[K](id: K) {
  def of[T] = new Id[T,K](id)
}

object Ids {
  def apply[K](ids:Seq[K]) = UntypedIds(ids)

  type LookUpMany[T,K] = Ids[T,K] => RefMany[T]

  case class LookUpPair[T,K](ids:Ids[T,K], lu:LookUpMany[T,K])

  implicit class AsIds[K](val k:Seq[K]) extends AnyVal {
    def asIds[T] = Ids[T,K](k)
  }<commit_msg>Added Ids.contains and Ids.toRefMany<commit_after>package com.wbillingsley.handy

case class Ids[T, K](ids: Seq[K]) {

  def lookUp(implicit lu: LookUp[T,K]) = lu.many(this)

  def contains(id:Id[T, K]) = ids.contains(id.id)

  def toRefMany(implicit lu:LookUp[T, K]) = RefManyById(ids)(lu)

}

case class UntypedIds[K](id: K) {
  def of[T] = new Id[T,K](id)
}

object Ids {
  def apply[K](ids:Seq[K]) = UntypedIds(ids)

  type LookUpMany[T,K] = Ids[T,K] => RefMany[T]

  case class LookUpPair[T,K](ids:Ids[T,K], lu:LookUpMany[T,K])

  implicit class AsIds[K](val k:Seq[K]) extends AnyVal {
    def asIds[T] = Ids[T,K](k)
  }
{'fraction_non_alphanumeric': 0.1891891891891892, 'fraction_numerical': 0.0, 'mean_word_length': 4.816753926701571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7581930', 'n_tokens_mistral': 519, 'n_tokens_neox': 505, 'n_words': 96}