O(length first list).
ModuleAgda-2.8.0.2Haskell2010
Agda.Utils.List2
Lists of length at least 2.
Import as:
import Agda.Utils.List2 (List2(List2))
import qualified Agda.Utils.List2 as List2
- 1 type
- 15 values
- PackageAgda-2.8.0.2
- Exports17
- LanguageHaskell2010
- LicenceMIT
- SourceList2.hs
O(length first list).
Concatenate at least 2 lists of length at least 1.
O(1).
Unsafe! O(1).
Safe. O(1).
Safe. O(1).
Safe. O(1).
Safe. O(n).
O(n).
Safe. O(1).
Safe. O(1).
Inverse of fromList1Either. O(1).
Lists of length ≥2.
Constructors
List2 a a [a]
Instances17Functor, Foldable, Traversable, IsList, Eq, Ord, …
Functor List2Defined in Agda-2.8.0.2 · Agda.Utils.List2Foldable List2Defined in Agda-2.8.0.2 · Agda.Utils.List2Traversable List2Defined in Agda-2.8.0.2 · Agda.Utils.List2IsList (List2 a)Defined in Agda-2.8.0.2 · Agda.Utils.List2fromList is unsafe.
Eq a => Eq (List2 a)Defined in Agda-2.8.0.2 · Agda.Utils.List2Ord a => Ord (List2 a)Defined in Agda-2.8.0.2 · Agda.Utils.List2Show a => Show (List2 a)Defined in Agda-2.8.0.2 · Agda.Utils.List2NFData a => NFData (List2 a)Defined in Agda-2.8.0.2 · Agda.Utils.List2HasRange a => HasRange (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.PositionKillRange a => KillRange (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.PositionExprLike a => ExprLike (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Concrete.GenericFoldDecl a => FoldDecl (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Concrete.GenericTraverseDecl a => TraverseDecl (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.Concrete.GenericCPatternLike p => CPatternLike (List2 p)Defined in Agda-2.8.0.2 · Agda.Syntax.Concrete.PatternHasRangeWithoutFile a => HasRangeWithoutFile (List2 a)Defined in Agda-2.8.0.2 · Agda.Syntax.PositionEmbPrj a => EmbPrj (List2 a)Defined in Agda-2.8.0.2 · Agda.TypeChecking.Serialise.Instances.Common · orphantype Item (List2 a) = aDefined in Agda-2.8.0.2 · Agda.Utils.List2
The toList function extracts a list of Item l from the structure l.
It should satisfy fromList . toList = id.