<commit_before># Items marked with "*" need compiler extensions to handle

type k_v = record
  key : integer
  value : integer

process Wc_node : (k_v/- x, k_v/- y, -/k_v z) # * k_v occurrences missing "type" prefix
  # Instead of "vs" could have pattern matching, to give v1 and v2
  let vs = peek_all ([x, y]) # let [v1,v2] <= [x,y]
  let v1 = vs[0] # * check if can project from lists like this
  let v2 = vs[1]

  if v1.key = -1 and v2.key = -1: # * i think "-" cannot be prefix
    x => z # * this syntax had been disabled
    y => _ # * this is used to discard the next item on channel y
  else if v1.key = -1: # * not used "else if" form parses
    y => z
  else if v2.key = -1:
    x => z

  else if v1.key < v2.key:
    x => z
  else if v2.key < v1.key:
    y => z
  else:
    v1.value := v1.value + v2.value # * in-place update for record field
    v1 => z
    x, y => _ # * discarding next items from multiple channels<commit_msg>updated example to parse, and generate code;<commit_after># Items marked with "*" need compiler extensions to handle

type k_v : record
  key : integer
  value : integer

fun Wc_node : (k_v/- x, k_v/- y, -/k_v z) -> ()
  # Instead of "vs" could have pattern matching, to give v1 and v2
#  let vs = peek_all ([x, y]) # let [v1,v2] <= [x,y]
#  let v1 = vs[0] # * check if can project from lists like this
#  let v2 = vs[1]
  let v1 = ??x
  let v2 = ??y

  if v1.key = -1 and v2.key = -1: # * i think "-" cannot be prefix
    x => z # * this syntax had been disabled
    y => _ # * this is used to discard the next item on channel y
  else: if v1.key = -1: # * not used "else if" form parses
    y => z
  else: if v2.key = -1:
    x => z

  else: if v1.key < v2.key:
    x => z
  else: if v2.key < v1.key:
    y => z
  else:
    v1.value := v1.value + v2.value # * in-place update for record field
    v1 => z
    x, y => _ # * discarding next items from multiple channels
{'fraction_non_alphanumeric': 0.13036649214659685, 'fraction_numerical': 0.02617801047120419, 'mean_word_length': 2.394316163410302, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 20, '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': '7355512', 'n_tokens_mistral': 733, 'n_tokens_neox': 713, 'n_words': 292}