I’m trying to wrap my head around the bend programming language and I am struggling to understand how I can iterate/fold over multiple datastructures together.
given two lists
l = [1,2,3,4]
k = [5,6,7,8]
I’d like to do something like this: I want to fold over the two datastructures together and create a new list with the products: [(15),(26),(37),(48)]
result = fold l,k
case List/Cons,List/Cons:
return l*k
case List/Nil
return 0
But this doesn’t work as it’s incorrect syntax. Can someone also link a reference of the language? The github repo only contains syntax.md
but it’s incomplete/inaccurate (list comprehensions aren’t implemented yet,etc.)