DA.NonEmpty.Types
Daml 模块 DA.NonEmpty.Types 参考文档。
DA.NonEmpty.Types
本模块包含非空列表类型,以便赋予稳定的 package id。
该类型由 DA.NonEmpty 再导出,一般无需直接 import 本模块。
模块概览
数据类型
data NonEmpty a
NonEmpty 为非空列表类型,即至少含一个元素的列表。若 x 为非空列表,首元素为 x.hd,其余为 x.tl。
构造子:
NonEmpty| Field | Type | Description | | :---- | :--- | :---------- | | hd | a | | | tl | [a] | |
实例:
instance Foldable NonEmptyinstance Action NonEmptyinstance Applicative NonEmptyinstance Semigroup (NonEmpty a)instance GetField hd (NonEmpty a) ainstance GetField tl (NonEmpty a) [a]instance SetField hd (NonEmpty a) ainstance SetField tl (NonEmpty a) [a]instance IsParties (NonEmpty Party)instance Traversable NonEmptyinstance Functor NonEmptyinstance Eq a => Eq (NonEmpty a)instance Ord a => Ord (NonEmpty a)instance Show a => Show (NonEmpty a)
本文由 CC Privacy Club 根据 Canton Network 官方文档(CC-BY-4.0)整理翻译,仅供学习;实现细节以官方最新版本为准。