This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: list comprehension patterns


Quite interesting article, I found some minor typos/issues

* Where you say Kawa-specific "|" do you mean Kawa-specific "!" ?

* There is a repetition in this sentence "A "scan context" is is an expression"

* "and then result sequence is "spliced" into its context." You meant
"and the result"?

* Another repetition and the sentence is not completely clear "When in
the scope of two more more distinct scan variables then are scanned
"in parallel""

* I think what you call outer join should be called Cartesian product
or cross join


Regarding the hypothetical filtering syntax

(! [a ...] A #!if (P a))

what about using one of 'when', the first is inspired by the single
branch if in Racket (where the 'if' keyword is replaced by when).

(! [a ...] A when (P a))

Also 'where' or 'on' could be possibilities.

The ellipsis syntax is nice, however when more scan patterns are
nested together can be confusing, have you considered using two dots
instead of three

#|kawa:31|# (define (fun2 [[x ..] ..] [y ..])
#|.....32|#   [[(+ x y) ..] ..])

just thoughts

Cheers,
Andrea

On 17 May 2017 at 18:00, Per Bothner <per@bothner.com> wrote:
> I posted a new blog article:
> http://per.bothner.com/blog/2017/list-comprehension-patterns/
>
> Feedback welcome.
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]