Permalink
Fetching contributors…
Cannot retrieve contributors at this time
|
-- P11 Modified run-length encoding. |
|
|
|
data Entry a = Value a | Sequence Int a deriving Show |
|
|
|
f1 :: [(Int, a)] -> [Entry a] |
|
f1 = map toEntry |
|
where toEntry (1, x) = Value x |
|
toEntry (n, x) = Sequence n x |
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.