From 146e9cca64854cb15ec645f0babda1b20511bede Mon Sep 17 00:00:00 2001 From: Seng-Jik <853974536@qq.com> Date: Fri, 12 Jun 2020 12:57:01 +0800 Subject: [PATCH] =?UTF-8?q?add=20F#=E7=BC=96=E7=A8=8B=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=9A=84=E9=93=BE=E8=A1=A8.fs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...216\260\347\232\204\351\223\276\350\241\250.fs" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "F#\347\274\226\347\250\213\350\257\255\350\250\200\345\256\236\347\216\260\347\232\204\351\223\276\350\241\250.fs" diff --git "a/F#\347\274\226\347\250\213\350\257\255\350\250\200\345\256\236\347\216\260\347\232\204\351\223\276\350\241\250.fs" "b/F#\347\274\226\347\250\213\350\257\255\350\250\200\345\256\236\347\216\260\347\232\204\351\223\276\350\241\250.fs" new file mode 100644 index 0000000..d1dc75f --- /dev/null +++ "b/F#\347\274\226\347\250\213\350\257\255\350\250\200\345\256\236\347\216\260\347\232\204\351\223\276\350\241\250.fs" @@ -0,0 +1,14 @@ +type List<'a> = +| Node of 'a * List<'a> +| Tail + +let append x ls = + Node(x,ls) + +let myList = + Tail + |> append 1 + |> append 2 + |> append 3 + +printfn "%A" myList \ No newline at end of file -- Gitee