• bterwijnOP
      link
      fedilink
      arrow-up
      2
      ·
      24 days ago

      Nice one, see the “Solution” link for correct answer.

    • bterwijnOP
      link
      fedilink
      arrow-up
      2
      ·
      28 days ago

      Incorrect sorry, check the “Solution” link for the correct answer.

      • Kairos@lemmy.today
        link
        fedilink
        arrow-up
        1
        ·
        28 days ago

        Oh du-duoy. Forgot that list of list is a list of pointers somehow while also remembering a list is a pointer. Thanks.

    • bterwijnOP
      link
      fedilink
      arrow-up
      1
      ·
      28 days ago

      Different languages make different choices. The disadvantage of Haskell is that if you want to change one value in a collection of a million values that it either makes a full copy or tries to optimize by sharing values behind the scene, both resulting in significant overhead. Most people already understand that pure functional programming languages don’t deliver except in very specific circumstances: Haskell TIOBE rating 0.32%, https://www.tiobe.com/tiobe-index/