Twitter | Pretraživanje | |
Conor White-Sullivan🧢
Reduce. Filter. Map. I first learned to code for the same reason I learned foreign languages. I was promised it would change the way I think. Those three functions for transforming lists delivered so thoroughly it's hard to think without them. Algorithms of thought.
Reply Retweet Označi sa "sviđa mi se" More
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Reduce: Take a list, an accumulator, and a function that looks at each item in the list one at a time, and the current value of the accumulator, and transforms the accumulator to pass on to the next value in the list. Can produce a new list, or just find a single value
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Map and Filter are both built out of reduce
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Filter -- take a list, and a test, return only the items of the list that meet the test criteria
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Map -- take a list, and a transformation function, return a new list
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
In practice -- for notes Filter your notes for questions Map over your open questions and say -- how could I reframe this question to make it easier to answer -- what smaller or bigger questions help me answer this one -- how will I know I've found an answer
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Filter your notes for beliefs Map over them Ask -- How surprised would I be if this were false ("weight") -- what other beliefs do I think are true because this one is *what does this imply* -- What other beliefs, if I changed my mind about them, would change this one
Reply Retweet Označi sa "sviđa mi se"
Conor White-Sullivan🧢 30. svi
Odgovor korisniku/ci @Conaw
Even computer threads look at items in a list one at a time. They just do it quickly. No shame in doing the same
Reply Retweet Označi sa "sviđa mi se"
Gordon Brander 15. pro
Odgovor korisniku/ci @Conaw
Understanding Hickey's reducers/transducers was a transcendental moment for me. Flipped my thinking inside-out.
Reply Retweet Označi sa "sviđa mi se"
Alper Çuğun-Gscheidel 📖☕️🇪🇺🌹🌻 15. pro
Odgovor korisniku/ci @Conaw
What do you reckon about fmap and bind and the likes?
Reply Retweet Označi sa "sviđa mi se"