I’ve always flunked at math; and knowing how intertwined programming is with math, I’m skeptical of my ability to learn how to code. Can someone be too dumb to learn programming? If it helps, I’m mostly interested in learning Common Lisp.

  • corytheboyd@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    It took me a long time to really grok iterative methods like this, but once it clicks, you will absolutely know and feel like you have unlocked a new super power.

    It starts with completely understanding that you are just passing functions as arguments, abs those functions are being invoked in a loop for each item in the collection. Once that is internalized, you learn the differences between filter, map, reduce, etc. The general differences boil down to: 1. How the iterator function changes the value being iterated over (most don’t) 2. What does the iterator function return (map and filter both return a new list, reduce returns the data structure being reduced into)

    I would skip trying to understand reduce at first, though it’s the method you can implement all other such iterative functions with. The derivations like map and filter are just easier to start with.

    And again, seriously, it took me like 2 years to completely internalize all of this, even after CS classes.