March 8, 2024
Bashing my head against a wall: Week 6 of 48 in 24
This week’s1 challenge was List Ops: create methods for manipulating lists like map, filter and reduce (well, foldr and foldl). I found this exercise frustrating in different languages in different ways. I used bash, elixir and haskell. In elixir and haskell, the frustration was that the exercise required me to return the standard list objects. I think it would have been more fun and more interesting to actually create a new list type and implement the methods there. For example, do these list operations look significantly different if you have a dynamic array compared to if you have a linked list? (For example, reversing a doubly linked list is just swapping the next and previous pointers, whereas reversing an array is going to be quite different).
Read more