module Fold.ShortcutNonempty.Examples.Interesting
  (
    {- * First/last -} first,
  )
  where

import Fold.ShortcutNonempty.Type

import Data.Void (absurd)

{-| The first input (tenacious) -}
first :: ShortcutNonemptyFold a a
first :: forall a. ShortcutNonemptyFold a a
first = ShortcutNonemptyFold
  { initial :: a -> Vitality a Void
initial = forall a b. a -> Vitality a b
Dead
  , step :: Void -> a -> Vitality a Void
step = forall a. Void -> a
absurd
  , extract :: Vitality a Void -> a
extract = \Vitality a Void
v -> case Vitality a Void
v of { Dead a
x -> a
x }
  }