Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

dcg

Implement the member predicate as a one-liner

December 22, 2023 by Tarik

Solution: member(X, [Y|T]) :- X = Y; member(X, T). Demonstration: ?- member(a, []). fail. ?- member(a, [a]). true ; fail. ?- member(a, [b]). fail. ?- member(a, [1, 2, 3, a, 5, 6, a]). true ; true ; fail. How it works: We are looking for an occurrence of the first argument, X, in the the … Read more

Categories list Tags dcg, list, prolog Leave a comment

What are good starting points for someone interested in natural language processing? [closed]

July 26, 2023 by Tarik
Categories nlp Tags dcg, nlp Leave a comment

What is the difference between ‘ and ” in Prolog?

April 13, 2023 by Tarik

Single quoted items are always atoms. The meaning of double quotes depends on the Prolog flag double_quotes: atom — with this value “a” = a. Nowadays, this is rarely used. But you will find Prolog books where [“abc.pl”] is written. codes — a list of character codes. This is frequently the default, but it leads … Read more

Categories prolog Tags dcg, double-quotes, iso-prolog, prolog Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa