Kaynağa Gözat

Create a custom function to reverse a list

DricomDragon 5 yıl önce
ebeveyn
işleme
93572ab22a
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      listfct.hs

+ 5 - 0
listfct.hs

@@ -0,0 +1,5 @@
+myexchanger xs zs = case xs of
+	[] -> zs
+	y:ys -> myexchanger ys (y:zs)
+
+myreverse xs = myexchanger xs []