上传者: 46463785
|
上传时间: 2021-06-03 09:04:20
|
文件大小: 2KB
|
文件类型: FS
3. 实现 cps目录中 cps-activity.pdf 中的 CPS 转换
pdf文件里面的代码是 haskell
将代码改写为 F#
1 sumList [] = 0
2 sumList (x:xs) = x + sumList xs
1 map f [] = []
2 map f (x:xs) = f x : map f xs
1 map f [] = []
2 map f (x:xs) = f x : map f xs
1 min a b = if a < b then a else b
2 min4 a b c d = min (min a b) (min c d)