June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import Data.List
|
||||
|
||||
breakIncl :: (a -> Bool) -> [a] -> [a]
|
||||
breakIncl p = uncurry ((. take 1). (++)). break p
|
||||
|
||||
taskLLB k = map (breakIncl (==k)). breakIncl (k`elem`)
|
||||
taskLLB k = map (breakIncl (==k)). breakIncl (k `elem`)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
mij :: [[Int]]
|
||||
mij = takeWhile(not.null). unfoldr (Just. splitAt 5) $
|
||||
[2, 6, 17, 5, 14, 1, 9, 11, 18, 10, 13, 20, 8, 7, 4, 16, 15, 19, 3, 12]
|
||||
|
||||
*Main> mapM_ (mapM_ print) $ taskLLB 20 mij
|
||||
*Main> mapM_ (mapM_ print) $ taskLLB 20 [[2,6,17,5,14],[1,9,11,18,10],[13,20,8,7,4],[16,15,19,3,12]]
|
||||
2
|
||||
6
|
||||
17
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue