title: Prolog - unusual cons syntax for lists
body: <p>I have come across an unfamiliar bit of Prolog syntax in Lee Naish's paper <em><a href="http://www.csee.umbc.edu/771/papers/mu_96_02.pdf">Higher-order logic programming in Prolog</a></em>. Here is the first code sample from the paper:</p>
  
  <pre><code>% insertion sort (simple version)
  isort([], []).
  isort(A.As, Bs) :-
      isort(As, Bs1),
      isort(A, Bs1, Bs).
  
  % insert number into sorted list
  insert(N, [], [N]).
  insert(N, H.L, N.H.L) :-
      N =&lt; H.
  insert(N, H.LO, H.L) :-
      N &gt; H,
      insert(N, LO, L).
  </code></pre>
  
  <p>My confusion is with <code>A.As</code> in <code>isort(A.As, Bs) :-</code>. From the context, it <em>appears</em> to be an alternate cons syntax for lists, the equivalent of <code>isort([A|As], Bs) :-</code>.</p>
  
  <p>As well <code>N.H.L</code> appears to be a more convenient way to say <code>[N|[H|L]]</code>.</p>
  
  <p>But SWI Prolog won't accept this unusual syntax (unless I'm doing something wrong).</p>
  
  <p>Does anyone recognize it? is my hypothesis correct? Which Prolog interpreter accepts that as valid syntax?</p>