Série: Angelia
haskell
12 linhas
· Atualizado 2026-02-03
StringOps.hs
Angelia/Haskell/StringOps.hs
-- Exercise 9
module StringOps where
-- Put a character at the front of a string
prepend :: Char -> String -> String
prepend ch s = ch : s
-- Put a character at the end of a string (recursive)
append :: Char -> String -> String
append ch [] = [ch]
append ch (x:xs) = x : append ch xs
-- (equivalently: append ch s = s ++ [ch])
Artigos relacionados
Angelia
haskell
EN
Atualizado 2026-02-03
Adding.hs
Adding.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Adding.hs).
Ler artigo →
Angelia
haskell
EN
Atualizado 2026-02-03
Area.hs
Area.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Area.hs).
Ler artigo →
Angelia
haskell
EN
Atualizado 2026-02-03
Chess.hs
Chess.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Chess.hs).
Ler artigo →
Angelia
haskell
EN
Atualizado 2026-02-03
ChessGraphics.hs
ChessGraphics.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/ChessGraphics.hs).
Ler artigo →
Angelia
haskell
EN
Atualizado 2026-02-03
Examples.hs
Examples.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Examples.hs).
Ler artigo →
Angelia
haskell
EN
Atualizado 2026-02-03
Fibonacci.hs
Fibonacci.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Fibonacci.hs).
Ler artigo →