Sfoglia il codice sorgente

exercise 5.5: null with length

George C. Privon 1 anno fa
parent
commit
ba5759a9f1
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  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