Haskell函数式编程基础习题
来源:互联网 发布:mac可以玩使命召唤吗 编辑:程序博客网 时间:2024/06/05 15:27
-- Exercise 3.14myMin :: Int -> Int -> IntmyMin x y | x < y = x| otherwise = ymyMinThree :: Int -> Int -> Int -> IntmyMinThree x y z| myMinTwo < z = myMinTwo| otherwise = zwhere myMinTwo = myMin x y-- Exercise 3.13-- Exercise 3.12-- Exercise 3.11-- Exercise 3.10fourEqual :: Integer -> Integer -> Integer ->Integer -> BoolfourEqual m n x y = (threeEqual m n x) && (m ==y)threeEqual :: Integer -> Integer -> Integer -> BoolthreeEqual m n p = m ==n && n ==p-- Exercise 3.9threeDifferent :: Integer -> Integer -> Integer -> BoolthreeDifferent m n p = m /=n && m/=p && n/= p-- Exercise 3.8mystery:: Integer -> Integer -> Integer -> Boolmystery m n p = not ( (m == n) && (n==p))-- Exercise 3.7-- Exercise 3.6-- Exercise 3.5nAnd :: Bool -> Bool -> BoolnAnd TrueTrue=TruenAnd __=False-- Exercise 3.4andand :: Bool -> Bool -> Boolandand True True = Trueandand __ = Falseoror ::Bool -> Bool -> Booloror True _ = Trueoror _ True = Trueoror _ _ = False-- Exercise 3.3-- Exercise 3.2-- Exercise 3.1exOr :: Bool -> Bool -> BoolexOr x y | x /= y = True| otherwise = False
0 0
- Haskell函数式编程基础习题
- Haskell函数式编程基础习题(2)
- Haskell函数式编程基础习题(3)
- Haskell函数式编程基础习题(4)
- Haskell函数式编程基础习题(5)
- 《Haskell函数式编程入门》练习
- 函数式语言Haskell
- 函数式语言 Haskell
- 函数式程序设计 haskell
- <Haskell函数式编程入门>-第12章代码走读
- 函数式编程语言的魅力:浅谈 Haskell
- Haskell学习笔记 --- 函数式编程中的柯里化
- haskell 函数
- haskell 函数
- Frege-基于JVM的类Haskell纯函数式编程语言
- 函数式语言学院派之haskell之一
- 函数式编程基础
- Scala函数式编程课后习题答案(第五章)
- 九度OJ 题目1208:10进制 VS 2进制
- Python下的TK(二)控件之Label
- 根据离散概率随机返回int值java代码&理解
- 设置listContrl中指定行的颜色
- Ubuntu 12.04中MyEclipse 10.6+下载+安装+破解
- Haskell函数式编程基础习题
- 从C开始_结构体_结构指针
- Python下使用tarfile模块来实现文件归档压缩与解压
- 创建人/创建时间/最后修改人/最后修改时间封装处理
- 在不公平的世界里,证明自己!
- MySQL-python使用
- boost::enable_shared_from_this的部分实现研究
- 马云等语录
- Boost 库 Enable_shared_from_this 实现原理分析