Elektrine lite

← Feed

@jer_gib@functional.cafe

Post #2735429

2026-05-11 08:27 UTC

@byorgey@mathstodon.xyz What's more, `lzw` is another unfold. To be more precise, `uncurry (lzw f)` is an instance of `unfoldr`.

Replies (1)

  • @jer_gib@functional.cafe 2026-05-11 08:32

    @byorgey@mathstodon.xyz Given `lzw`, I think you have ``` conjugate :: [Int] -> [Int] conjugate = foldr incr [] where incr n ms = lzw (+) (replicate n 1) ms ```

    Open ##2735430