<commit_before>package com.ephox
package argonaut

import scalaz._, Scalaz._

sealed trait ACursor {
  val succeeded: Boolean
  val hcursor: HCursor

  import ACursor._
  import HCursor._
  import CursorOp._
  import Json._

  def failed: Boolean =
    !succeeded

  def cursor: Cursor =
    hcursor.cursor

  def history: CursorHistory =
    hcursor.history

  def reattempt: ACursor =
    ACursor.build(hcursorHistoryL.mod(reattemptOp +: _, hcursor), true)

  def unary_~ : ACursor =
    reattempt

  /** Return the current focus. */
  def focus: Json =
    cursor.focus

  /** Update the focus with the given function (alias for `withFocus`). */
  def >->(k: Json => Json): ACursor =<commit_msg>convenienve ACursor#jdecode<commit_after>package com.ephox
package argonaut

import scalaz._, Scalaz._

sealed trait ACursor {
  val succeeded: Boolean
  val hcursor: HCursor

  import ACursor._
  import HCursor._
  import CursorOp._
  import Json._

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

  def failed: Boolean =
    !succeeded

  def cursor: Cursor =
    hcursor.cursor

  def history: CursorHistory =
    hcursor.history

  def reattempt: ACursor =
    ACursor.build(hcursorHistoryL.mod(reattemptOp +: _, hcursor), true)

  def unary_~ : ACursor =
    reattempt

  /** Return the current focus. */
  def focus: Json =
    cursor.focus

  /** Update the focus with the given function (alias for `withFocus`). */
  def >->(k: Json => Json): ACursor =
{'fraction_non_alphanumeric': 0.09879670677644078, 'fraction_numerical': 0.0, 'mean_word_length': 3.202127659574468, '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': '6712352', 'n_tokens_mistral': 533, 'n_tokens_neox': 507, 'n_words': 156}