Thanks Alex, So, would you suggest that I familiarize myself with prolog before venturing deeper into app development in picolisp? I think it will be helpful for me if I could get an english translation of this? (? @Nr (and *CuSuNr (cons @ T)) @Nm *CuSuNm @Tel *CuSuTel @Plz *CuSuPlz @Ort *CuSuOrt @Mob *CuSuMob (select (@@) ((nr +CuSu @Nr) (nm +CuSu @Nm) (tel +CuSu @Tel) (plz +CuSu @Plz) (ort +CuSu @Ort) (mob +CuSu @Mob) ) (range @Nr @@ nr) (tolr @Nm @@ nm) (fold @Tel @@ tel) (head @Plz @@ plz) (part @Ort @@ ort) (fold @Mob @@ mob) ) )
Regards, Kashyap On Mon, Oct 21, 2019 at 10:00 AM Alexander Burger <a...@software-lab.de> wrote: > On Mon, Oct 21, 2019 at 07:12:32AM -0700, C K Kashyap wrote: > > Finally - its good to see the values :) ... I used (show @@). > > I see, so @@ is just a "variable" introduced in the select function - i > got > > a little confused by (@@) - I thought it was a function call - but looks > > like select takes the argument unevaluated :) (love the (vi 'select) ) > > We cannot talk about "evaluation" in Pilog, as this is no Lisp despite it > uses > s-expressions. > > It is all about "unification", i.e. values are matched with patterns > containing > variables. And a variable is recognized by Pilog because it starts with > "@". In > real Prolog variables are recognized because they start with an uppercase > letter. > > > > I noticed that the variable name has to start with @ - It does not work > if > > I use a name without @ - why is that? > > Exactly. This is how Prolog works. Perhaps you may want to look at some > intro > like https://www.metalevel.at/prolog - Prolog is a beast very different > from > other languages. > > > Also, I noticed that functions in the > > form library have their parameter names in the string format (for > example (de > > form ("Attr" . "Prg")) - I am curious about that too. > > These are transient symbols used for privacy. See > https://software-lab.de/doc/faq.html#problems > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >