1. 首页
  2. 数据库
  3. 其它
  4. elm n nat type:表示类型内的数字 源码

elm n nat type:表示类型内的数字 源码

上传者: 2021-04-08 19:56:11上传 ZIP文件 40.96KB 热度 6次
榆n型 如何表达一种类型中的数字? 该软件包使您能够做到这一点。 让我们看一个例子:实现一个NaturalNumber module NaturalNumber exposing ( NaturalNumber ) import Nat.Type exposing (..) 确切的描述。 -- we don't expose this constructor type NaturalNumber n = NaturalNumber Int one : NaturalNumber N1Nat one = NaturalNumber 1 two : NaturalNumber N2Nat two = NaturalNumber 2 ten : NaturalNumber N10Nat ten = NaturalNumber 10 takesOnlyEx
下载地址
用户评论