<commit_before>package argonaut

case class ACursor(either: Either[HCursor, HCursor]) {
  import HCursor._
  import CursorOp._
  import Json._

  /** Get the current hcursor if we are in an succeeded state. Alias for `success`. */
  def hcursor: Option[HCursor] =
    either.right.toOption

  /** Get the current hcursor if we are in an succeeded state. Alias for `hcursor`. */
  def success: Option[HCursor] =
    hcursor

  /** Get the failed hcursor if we are in an failed state. Alias for `hcursor`. */
  def failure: Option[HCursor] =
    either.left.toOption

  /**
   * Attempts to decode this cursor focus value to another data type.
   */
  def jdecode[A](implicit e: DecodeJson[A]): DecodeResult[A] =
    e.tryDecode(this)

  /**
   * Attempts to decode this cursor focus value to another data type.
   * Alias for `jdecode`.
   */
  def as[A](implicit e: DecodeJson[A]): DecodeResult[A] =
    jdecode[A]

  /**
   * Attempts to move down onto a field `name` and decode the focus.<commit_msg>Fix to the comment on ACursor#failure, hat tip to @refried.<commit_after>package argonaut

case class ACursor(either: Either[HCursor, HCursor]) {
  import HCursor._
  import CursorOp._
  import Json._

  /** Get the current hcursor if we are in an succeeded state. Alias for `success`. */
  def hcursor: Option[HCursor] =
    either.right.toOption

  /** Get the current hcursor if we are in an succeeded state. Alias for `hcursor`. */
  def success: Option[HCursor] =
    hcursor

  /** Get the failed hcursor if we are in an failed state. */
  def failure: Option[HCursor] =
    either.left.toOption

  /**
   * Attempts to decode this cursor focus value to another data type.
   */
  def jdecode[A](implicit e: DecodeJson[A]): DecodeResult[A] =
    e.tryDecode(this)

  /**
   * Attempts to decode this cursor focus value to another data type.
   * Alias for `jdecode`.
   */
  def as[A](implicit e: DecodeJson[A]): DecodeResult[A] =
    jdecode[A]

  /**
   * Attempts to move down onto a field `name` and decode the focus.
{'fraction_non_alphanumeric': 0.10694923607688517, 'fraction_numerical': 0.0, 'mean_word_length': 3.2028985507246377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '362124', 'n_tokens_mistral': 660, 'n_tokens_neox': 633, 'n_words': 237}