Elektrine lite

← Feed

@jer_gib@functional.cafe

Post #2735430

2026-05-11 08:32 UTC

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

Replies (1)

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

    @byorgey@mathstodon.xyz There should also be a way to write that using `replicate n succ` directly, but now I have to rush off and do something less interesting.

    Open ##2735431