What do you want to save?
Add Code snippet
New code examples in category Haskell
-
Ilya 2021-10-04 04:22:10
haskell for loop
{- Simple loop -} repeatNTimes 0 _ = return () repeatNTimes n action = do action repeatNTimes (n-1) action main = repeatNTimes 10 (putStrLn "a string") -- naive recursion loop :: Int -> Int loop n = loop' n 0 where loop' 0 a = a ... Add solution -
Bhanu Mathur 2021-09-26 10:34:02
haskell string split
-- There is a package for this called split. cabal install split -- Use it like this: ghci> import Data.List.Split ghci> splitOn "," "my,comma,separated,list" ["my","comma","separated","list&... Add solution