I'm trying to define zip(), but can't come up with a signature for a function that returns a lazy list of lvalues, but the list itself is not lazy?

As a second matter, can you declare a type for the elements of a slurpy array?

So far I have:

multi sub zip (Array [EMAIL PROTECTED]) returns List {
  gather {
    while any(@lists) {
      for @lists -> @list {
        take shift @list;
      }
    }
  }
}

But I can't tackle the lvalue problem.

btw, I'm defining the semantics of some of several functions by simply supplying a reference implementation.





Reply via email to