------------------------------------------------------------------------
-- The Agda standard library
--
-- Natural numbers: sum and product of lists
--
-- Issue #2553: this is a compatibility stub module,
-- ahead of a more thorough breaking set of changes.
------------------------------------------------------------------------

{-# OPTIONS --without-K --safe #-}

module Data.Nat.ListAction where

open import Data.List.Base using (List; []; _∷_; _++_; foldr; foldl)

open import Data.Nat.Base using (; _+_; _*_; _⊔′_; _⊓′_)


------------------------------------------------------------------------
-- Definitions

sum : List   
sum = foldr _+_ 0

product : List   
product = foldr _*_ 1

minimum :   List   
minimum = foldl _⊓′_

maximum :   List   
maximum = foldl _⊔′_