Browse Source

exercise 5.5: null with length

George C. Privon 1 năm trước cách đây
mục cha
commit
ba5759a9f1
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      05-Lists/exercises/ex5.5.hs

+ 8 - 0
05-Lists/exercises/ex5.5.hs

@@ -0,0 +1,8 @@
+-- Exercise 5.5
+-- George C. Privon
+-- 2024-07-20
+
+null' :: [a] -> Bool
+null' ys = if length ys == 0
+           then True
+           else False