On Sat, Aug 24, 2013 at 5:45 AM, Me wrote:
> Hi all.
> I'm new to haskell. I have a puny piece of code:
>
> import Data.List.Split
>
> padL :: Int -> String -> String
> padL n s
> | length s < n = replicate (n - length s) '0' ++ s
>
You use `length s` but the computation is not shared betwee
Le 24/08/2013 14:45, Me a écrit :
I'm new to haskell. I have a puny piece of code:
... blah.
Is it good haskell, bad haskell or average haskell? How can it be
rewritten?
Don't you think that
1. Telling us WHAT DO YOU WANT from your code
2. Signing your letter with a human name
might help?
Hi all.
I'm new to haskell. I have a puny piece of code:
import Data.List.Split
padL :: Int -> String -> String
padL n s
| length s < n = replicate (n - length s) '0' ++ s
| otherwise = s
strInc :: String -> String -> String
strInc sep str =
let strarr = splitOn sep str