Debian Codegraph @

src/Data/List/Show.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Showing lists
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Data.List.Show where
10
11 open import Data.List.Base using (List; map)
12 open import Data.String.Base using (String; between; intersperse)
13 open import Function.Base using (_∘_)
14
15 show : ∀ {a} {A : Set a} → (A → String) → (List A → String)
16 show s = between "[" "]" ∘ intersperse ", " ∘ map s