Re: how to go from a list of lists to a list of first elements

Yes indeed William, http://ppr.cs.dal.ca:3002/n3/editor/s/MyvdkJpa does not
work
but http://ppr.cs.dal.ca:3002/n3/editor/s/qr0in3if works fine.

The reason is that the experimental implementation of log:collectAllIn
expects
that all the universals in the where-clause that are not in the
select-pattern
must be ground. The built-in is eventually suspended to achieve this
grounding.

This is also the reason that Doerthe was not happy with the extended
select-pattern
but the answer-list can be simplified again using list:map as shown in the
previous email.

Jos

-- https://josd.github.io


On Tue, Jan 11, 2022 at 1:58 PM William Van Woensel <
william.vanwoensel@gmail.com> wrote:

> Hi Jos, Doerthe,
>
> My confusion about this example yesterday stemmed from the fact that it is
> unclear why “?u” is also being collected, if it is not being used later on.
> But now I assume it is simply part of the example (and not related to
> scoping within the collectAllIn builtin, which is what I believe we were
> talking about :-)?
>
>
>
> On that note: as I mentioned yesterday, one could identify at compile time
> all local variables within the where clause of collectAllIn, but only
> barring some exceptional circumstances. Such as:
>
> http://ppr.cs.dal.ca:3002/n3/editor/s/tfsdyPr0
>
>
>
> (this “pulling in” of universal variables into rules, meaning they become
> part of the reasoning machinery, was actually a big problem in jen3..)
>
>
>
> When compiling this example I found that the following doesn’t seem to
> work in Eye:
>
> http://ppr.cs.dal.ca:3002/n3/editor/s/zc2tHpTw
>
>
>
>
>
> Thoughts?
>
>
>
> William
>
>
>
> *From: *Jos De Roo <josderoo@gmail.com>
> *Date: *Monday, January 10, 2022 at 3:03 PM
> *To: *public-n3-dev@w3.org <public-n3-dev@w3.org>
> *Subject: *how to go from a list of lists to a list of first elements
>
> This is about the question of Doerthe
>
> [[
>
> Question:
>
> http://ppr.cs.dal.ca:3002/n3/editor/s/Mut5EohI
>
> Would we use built-ins here?
>
> ]]
>
>
>
> So how to go from a list of lists to a list of first elements?
>
>
>
> We could use list:map like is done in
> http://ppr.cs.dal.ca:3002/n3/editor/s/xrtMG2Xc
>
>
>
> Jos
>
>
> -- https://josd.github.io
>

Received on Tuesday, 11 January 2022 13:28:56 UTC