<commit_before>:- module(
  pl_term,
  [
    write_fact/1, % @Term
    write_term/1  % @Term
  ]
).

/** <module> Prolog term

Additional support for handling Prolog terms.

@author <NAME>
@version 2015/07, 2015/10
*/

:- use_module(library(apply)).




<commit_msg>ADDED: n_ary_term/3<commit_after>:- module(
  pl_term,
  [
    n_ary_term/3, % +Pred, +Args, -Comp
    write_fact/1, % @Term
    write_term/1  % @Term
  ]
).

/** <module> Prolog term

Additional support for handling Prolog terms.

@author <NAME>
@version 2015/07, 2015/10, 2016/08
*/

:- use_module(library(apply)).





%! n_ary_term(+Pred, +Args, -Comp) is det.

n_ary_term(Pred, [H], Comp) :- !,
  Comp =.. [Pred,H].
n_ary_term(Pred, [H1,H2], Comp) :- !,
  Comp =.. [Pred,H1,H2].
n_ary_term(Pred, [H|T], Comp) :- !,
  n_ary_term(Pred, T, Comp0),
  Comp =.. [Pred,H,Comp0].



{'fraction_non_alphanumeric': 0.19171597633136095, 'fraction_numerical': 0.04970414201183432, 'mean_word_length': 3.167487684729064, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2801277', 'n_tokens_mistral': 399, 'n_tokens_neox': 358, 'n_words': 73}