[new] [Gutter]

Echtscheidng

Voor we aan de vechtscheding beginnen

And first, enjoy this code (visual-prolog.com)

implement main
 
domains
    gender = female; male.
 
class facts - familyDB
    person : (string Name, gender Gender).
    parent : (string Person, string Parent).
 
class predicates
    father : (string Person, string Father) nondeterm anyflow.
clauses
    father(Person, Father) :-
        parent(Person, Father),
        person(Father, male).
 
class predicates
    grandFather : (string Person [out], string GrandFather [out]) nondeterm.
clauses
    grandFather(Person, GrandFather) :-
        parent(Person, Parent),
        father(Parent, GrandFather).
 
class predicates
    ancestor : (string Person, string Ancestor [out]) nondeterm.
clauses
    ancestor(Person, Ancestor) :-
        parent(Person, Ancestor).
    ancestor(Person, Ancestor) :-
        parent(Person, P1),
        ancestor(P1, Ancestor).
 
class predicates
    reconsult : (string FileName).
clauses
    reconsult(FileName) :-
        retractFactDB(familyDB),
        file::consult(FileName, familyDB).
 
clauses
    run() :-
        console::init(),
        stdio::write("Load data\n"),
        reconsult(@"..\fa.txt"),
        stdio::write("\nfather test\n"),
        father(X, Y),
        stdio::writef("% is the father of %\n", Y, X),
        fail.
 
    run() :-
        stdio::write("\ngrandFather test\n"),
        grandFather(X, Y),
        stdio::writef("% is the grandfather of %\n", Y, X),
        fail.
 
    run() :-
        stdio::write("\nancestor of Pam test\n"),
        X = "Pam",
        ancestor(X, Y),
        stdio::writef("% is the ancestor of %\n", Y, X),
        fail.
 
    run() :-
        stdio::write("End of test\n").
 
end implement main
 
goal
    mainExe::run(main::run).

more

  • Ik er ervaar het brexit-gedoe als een vechtscheiding.
  • Ik was meer dan gekwetst dat de britten het uitmaakte
  • Om 5 uur `s morgens (CET) werd het duidelijk
  • 52/48
  • De scheding was een feit.

Madness is leuk voor popsongs maar niet voor politics

  • Hero Newton
  • Heroes: Bowie, Stones, Beatles, Who, .....
  • Falklands, secret diary? I love it.

Related Posts

( by kred to who cares at 2018-11-16 19:52:30 in Gutter )



International money transfers? Worldremit beats your bank!

Domains, Hosting? Go Versio!

[Login to add a comment]
[new]