tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,9 @@
|
|||
action p x = if p x then succ x else x
|
||||
|
||||
fenceM p q s [] = guard (q s) >> return []
|
||||
fenceM p q s (x:xs) = do
|
||||
(f,g) <- p
|
||||
ys <- fenceM p q (g s) xs
|
||||
return $ f x ys
|
||||
|
||||
ncsubseq = fenceM [((:), action even), (flip const, action odd)] (>= 3) 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue