Mercurial > repo
changeset 4269:b70362a4c382
<Bike> fetch http://lpaste.net/raw/98076
author | HackBot |
---|---|
date | Tue, 07 Jan 2014 03:47:08 +0000 |
parents | 383e29aa08f4 |
children | 07293c75b4d9 |
files | 98076 |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/98076 Tue Jan 07 03:47:08 2014 +0000 @@ -0,0 +1,9 @@ +-- Hi everyone! +-- Could please someone explain me an output of the function: + +splitEvery n list = first : ( splitEvery n rest ) + where (first, rest) = splitAt n list + +-- it returns a lis of lists splitEvery :: Int -> [a] -> [[a]] +-- But I don't understand how it works, why it returns list of lists. +-- splitAt returns TUPLE and "first" is somehow joined to it. \ No newline at end of file