gpt4 book ai didi

haskell - 在haskell中,:+: mean in data type definition?是什么意思

转载 作者:行者123 更新时间:2023-12-02 05:27:08 25 4
gpt4 key购买 nike

这是新数据类型的定义:

data Total a = Total a :+: Total a 
|...

:+: 在这个类型定义中意味着什么?

最佳答案

它是一个以中缀形式编写的数据构造函数。如果运算符以 : 开头,则可以将其用作构造函数。

关于haskell - 在haskell中,:+: mean in data type definition?是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12733171/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com