fcf-containers-0.7.2: Data structures and algorithms for first-class-families
Copyright(c) gspia 2023-
LicenseBSD
Maintainergspia
Safe HaskellSafe-Inferred
LanguageHaskell2010

Fcf.Data.List.Utils

Description

Fcf.Data.List.Utils

The following would probably have better place at the first-class-families library. That is, polish and make a PR.

Synopsis

Documentation

>>> import qualified GHC.TypeLits as TL
>>> import           Fcf.Data.Nat

data Foldl :: (b -> a -> Exp b) -> b -> t a -> Exp b Source #

Foldl in terms of Foldr.

Example

Expand
>>> :kind! Eval (Foldl (Fcf.-) 10 '[3,2,1])
Eval (Foldl (Fcf.-) 10 '[3,2,1]) :: Nat
= 4

Instances

Instances details
type Eval (Foldl f b ta :: a1 -> Type) Source # 
Instance details

Defined in Fcf.Data.List.Utils

type Eval (Foldl f b ta :: a1 -> Type) = Eval (Foldr (Flip f) b (Eval (Reverse ta)))