Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uncode' lst = uncode 1 (c-1) [] k
- where uncode n p z k |p==0 = n
- |otherwise = uncode (des z) (p-1) (1:(take n k)) (drop n k)
- k lst = drop (c lst +1) lst
- c lst |head lst == 1 = 1+( c (tail lst) )
- |otherwise = 0
Advertisement
Add Comment
Please, Sign In to add comment