0
這段代碼有什麼問題?函數在預計bool時返回字符串
fun expd s:string = if size(s) > 0 then true else false;
錯誤我收到:
- fun exnd s:string = if size(s) > a then true else false;
stdIn:657.1-837.8 Error: unbound variable or constructor: a
Error: right-hand-side of clause doesn't agree with function result type [tycon mismatch]
expression: bool
result type: string
這究竟是爲什麼?