3 Nov 2008 tampe   » (Journeyer)

Oh what an addition

yielding stuff has it's complications, consider this generator,

    (+ (do (yield 1) (yield 2))
       (do (yield 3) (yield 4)))

(do (yield 1) (yield 2)) first yield 1 and then yields 2 if there is no yield in the other argument that argument will not be updated, but now we have another yield statement. How would you solve that?

I just consider the evaluation of the yield as a parallel statement meaning that the above construct will give

  (+ 1 3)
  (+ 2 4)
The hole construct is a little isoteric but you may want to have the possibility to first yield all the elements of the first arguments and then all the elements of the second argument or any combination you can dream up This is a sequencing patterns that I have not considered but it's interesting to make a note of it in the head. Implementing a tool to allow all possibilities is not that hard but if it is worth it, I don't now.

A strange day, is also a day, Cheers

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!