A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://agda.github.io/agda-stdlib/master/Data.Nat.ListAction.html below:

Data.Nat.ListAction

Data.Nat.ListAction
------------------------------------------------------------------------
-- 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 --cubical-compatible --safe #-}

module Data.Nat.ListAction where

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


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

sum : List   
sum = foldr _+_ 0

product : List   
product = foldr _*_ 1

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4