{-# OPTIONS_FRONTEND -F --pgmF=currypp #-} {-# OPTIONS_FRONTEND -Wnone #-} import Control.SetFunctions -- required by default rules -- Reverse a list if it has exactly two elements: rev2 [x,y] = [y,x] rev2'default xs = xs -- Operation to delete suffixes of the fornm ".0" -- (exploit functional patterns and default rules) fixInt :: String -> String fixInt (s++".0") = s fixInt'default s = s -- > fixInt "1.3" --> "1.3" -- > fixInt "1.0" --> "1" -- > fixInt "42" --> "42"