I’m exploring how some of the built-in list blocks work under the hood and would love to understand how to recreate their logic manually.
Specifically, I'm trying to replicate:
1."All but first of list"
– returns a list with all items except the first one.
2. "Reduce list starting with initial value by combining item and answer so far"
– like a reduce/fold function, where each list item is combined using a custom procedure and an initial value.
I’m doing this for learning purposes and to get a better grasp of how to build similar functionality with basic blocks (like loops and procedures). If anyone can share how these can be implemented step-by-step or with example blocks, that would be greatly appreciated!
for all but first of list, it's easy. just remove item 1 of list.
for reduce list function, it's not easy to make a general / universal procedure (only use build-in blocks), since AI2 do not support anonymous procedure.
The other solutions also involve reducing the list. I'm still trying to stick with the procedure. In the end, I may learn and share the correct approach.
I finally made an extension for my purpose. I've been sitting in front of my computer since then trying to solve this problem. I'm finally going to sleep now. I also used a small procedure. ListColumnReducer.aix (8.0 KB)