<commit_before>package fs2

import Stream.Handle
import Step._

object process1 {

  trait Process1[-I,+O] {
    def run[F[_]]: Stream[F,I] => Stream[F,O]
    def apply[F[_]](s: Stream[F,I]): Stream[F,O] = run(s)
  }

  // nb: methods are in alphabetical order

  def id[W]: Process1[W,W] =
    new Process1[W,W] { def run[F[_]] = _.pull[F,W](Pull.id) }

  def lift[W,W2](f: W => W2): Process1[W,W2] =
    new Process1[W,W2] { def run[F[_]] = _.pull(Pull.lift(f)) }

  def take[W](n: Int): Process1[W,W] =
    new Process1[W,W] { def run[F[_]] = _.pull(Pull.take(n)) }

  private[fs2] trait Read[I] {
    type f[+R] = Option[Chunk[I]] => R
  }<commit_msg>Added stepper method to Process1<commit_after>package fs2

import Stream.Handle
import Step._

object process1 {

  trait Process1[-I,+O] {
    def run[F[_]]: Stream[F,I] => Stream[F,O]
    def apply[F[_]](s: Stream[F,I]): Stream[F,O] = run(s)
    def stepper: Stepper[I,O] = process1.stepper(this)
  }

  // nb: methods are in alphabetical order

  def id[W]: Process1[W,W] =
    new Process1[W,W] { def run[F[_]] = _.pull[F,W](Pull.id) }

  def lift[W,W2](f: W => W2): Process1[W,W2] =
    new Process1[W,W2] { def run[F[_]] = _.pull(Pull.lift(f)) }

  def take[W](n: Int): Process1[W,W] =
    new Process1[W,W] { def run[F[_]] = _.pull(Pull.take(n)) }

  private[fs2] trait Read[I] {
    type f[+R] = Option[Chunk[I]] => R
  }
{'fraction_non_alphanumeric': 0.20953757225433525, 'fraction_numerical': 0.02167630057803468, 'mean_word_length': 3.694915254237288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2116697', 'n_tokens_mistral': 621, 'n_tokens_neox': 595, 'n_words': 126}