<commit_before>
DefaultBehavior FlowControl cond = syntax(
  "takes zero or more arguments. each two arguments are paired, where the first one is the condition part, and the second is the then-part. if there's an uneven number of arguments, that part is the else-part. if no arguments are provided, or no conditions match and there is no else part, cond returns nil.",
  
  DefaultBehavior FlowControl cell(:cond) createNestedIfStatements(call arguments))

DefaultBehavior FlowControl cell(:cond) createNestedIfStatements = method(args,
  if(args length == 0,
    `nil,
    if(args length == 1,
      ; an else part
      args[0],

      ; a condition, then part
      'if appendArgument(args[0]) appendArgument(args[1]) appendArgument(createNestedIfStatements(args[2..-1]))
    )
  )
)<commit_msg>Refactor cond to use the new composition stuff<commit_after>
DefaultBehavior FlowControl cond = syntax(
  "takes zero or more arguments. each two arguments are paired, where the first one is the condition part, and the second is the then-part. if there's an uneven number of arguments, that part is the else-part. if no arguments are provided, or no conditions match and there is no else part, cond returns nil.",
  
  DefaultBehavior FlowControl cell(:cond) createNestedIfStatements(call arguments))

DefaultBehavior FlowControl cell(:cond) createNestedIfStatements = method(args,
  if(args length == 0,
    'nil,
    if(args length == 1,
      ; an else part
      args[0],

      ; a condition, then part
      'if <<(args[0]) <<(args[1]) << createNestedIfStatements(args[2..-1])
    )
  )
)
{'fraction_non_alphanumeric': 0.08919597989949749, 'fraction_numerical': 0.008793969849246231, 'mean_word_length': 4.025236593059937, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '4976097', 'n_tokens_mistral': 453, 'n_tokens_neox': 439, 'n_words': 183}