#line 14 "/home/travis/build/felix-lang/felix/src/packages/stl.fdoc"
  
  class Iterator[it,t] {
    virtual fun deref: it -> t;
  }
  
  class Forward_iterator[it,t] {
    inherit Tord[it];
    inherit Forward[it];
    inherit Iterator[it,t];
  }
  
  class Bidirectional_iterator[it,t] {
    inherit Forward_iterator[it,t];
    inherit Bidirectional[it];
  }
  
  class Sequence[c,it,v] {
    inherit Eq[c];
    inherit Forward_iterator[it,v];
    inherit Container[c,v];
    virtual gen begin: c -> it;
    virtual gen end: c -> it;
    virtual proc erase: c * it;
    virtual proc erase_between: c * it * it;
    virtual proc clear: c;
    virtual fun fold[i] (f:i->v->i) (var acc:i) (x:c): i = {
      var s = begin x; var e = end x;
      while s != e do acc = f acc (*s); ++s; done;
      return acc;
    }
  }
  
  class Reversible_Sequence[c,it,rit,v] {
    inherit Sequence[c,it,v];
    inherit Bidirectional_iterator[it,v];
    inherit Bidirectional_iterator[rit,v];
    virtual gen rbegin: c -> rit;
    virtual gen rend: c -> rit;
    virtual fun rfold[i] (f:i->v->i) (var acc:i) (x:c): i = {
      var s = rbegin x; var e = rend x;
      while s != e do acc = f acc (*s); ++s; done;
      return acc;
    }
  }
  
  
  class Stl
  {
    type pair[k,v] = "::std::pair<?1 const,?2>";
    fun make_pair[k,v]: k * v ->pair[k,v] = "::std::make_pair($1,$2)";
  }