Browse Source

Project 05

completed
Craige McWhirter 9 months ago
parent
commit
d4974d5496
Signed by: craige GPG Key ID: 7DBA9F5689EFB6AA
  1. 11
      myReverse.hs

11
myReverse.hs

@ -0,0 +1,11 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -Wno-orphans #-}
-- Reverse a list.
myReverse :: [a] -> [a]
myReverse list = reverse' list []
where
reverse' [] reversed = reversed
reverse' (x:xs) reversed = reverse' xs (x:reversed)
Loading…
Cancel
Save