# One-parameter-Or-many-parameters?

I have a question about how to call the function when we see the type declartion.我有一个关于阅读函数声明时候，如何调用函数的疑问。 比如:

f :: (Double,Double,Double) -> (Double,Double) It is one parameter, but it must be a tuple with three tuple elements

::Double->Double->Double What does it mean?

areAsceneding :: Integer->Integer->Integer->Bool
areAsceneding a b c=a<b && b<c

areasceneding 1 2 3
--get true
areasceneding 1 4 2
--get false


Actually ,multiply parameter can changed into one parameter method by currying!!

You must care about the () means tuple data structure. [] means list data structure.

## 绑定Binding

x = 2                   -- 两个连字符号表示注解

y = 3                   --
main = let z = x + y    -- let 引入一个本地绑定
in print z       -- 程序将打印 5


add arg1 arg2 = arg1 + arg2 -- 定义函数add



括号可以包装复合表达式：

bad = print add 2 3 -- error! (打印只能有一个参数)
main = print (add 2 3) -- ok, 使用一个参数5作为打印参数


## 变量是不可变的

x = 5
x = 6 -- 错误, 不能再绑定x,但是在let中则是不一样


• Bool - 有两个元素： True 或 False
• Char - unicode符合集合
• Int - 固定大小整数
• Integer - 无限大小整数
• Double - IEEE 浮点数字
• type1 -> type2 - 一个输入类型type1 到输出类型 type2的函数
• (type1, type2, …, typeN) - 类型数组tuple
• () - 零数组tuple, 称为unit (类似C的void); 这个类型只有一个值：空。
• [Char]-> means list pk tuple.
##### 令狐冲
###### Engineer of offshore wind turbine technique research

My research interests include distributed energy, wind turbine power generation technique , Computational fluid dynamic and programmable matter.