瀏覽代碼

exercise 5.10: expression validity and type

George C. Privon 1 年之前
父節點
當前提交
6ab5548fb4
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      05-Lists/exercises/ex5.10.hs

+ 7 - 0
05-Lists/exercises/ex5.10.hs

@@ -0,0 +1,7 @@
+Expression              Valid?  Type or issue
+["hello", 42]           No      Mixed types within a list are not permitted
+['h',"ello"]            No      Mixing Char with a list o Char
+['a','b','c']           Yes     [Char]
+length ['w','h','o']    Yes     Int
+length "hello"          Yes     Int
+reverse                 Yes     [a] -> [a]