<commit_before>package main

//simple is a simple function, with no combinators.
type simple interface {
	Func
	contains(char) bool
}

func (c char) contains(other char) bool { return c == other }

func (p pair) contains(c char) bool {
	var first, second bool
	if s, ok := p[0].(simple); ok {
		first = s.contains(c)
	}
	if s, ok := p[1].(simple); ok {
		second = s.contains(c)
	}
	return first || second
}

func dumbParse(raw []byte) simple {
	if raw[0] == '`' {
		first, second := split(raw[1:])
		return pair{dumbParse(first), dumbParse(second)}
	}
	return char(raw[0])
}<commit_msg>Change pair.contains() to panic if combinators are involved.<commit_after>package main

//simple is a simple function, with no combinators.
type simple interface {
	Func
	contains(char) bool
}

func (c char) contains(other char) bool { return c == other }

func (p pair) contains(c char) bool {
	return p[0].(simple).contains(c) || p[1].(simple).contains(c)
}

func dumbParse(raw []byte) simple {
	if raw[0] == '`' {
		first, second := split(raw[1:])
		return pair{dumbParse(first), dumbParse(second)}
	}
	return char(raw[0])
}
{'fraction_non_alphanumeric': 0.1554357592093441, 'fraction_numerical': 0.008984725965858042, 'mean_word_length': 4.279620853080568, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2790574', 'n_tokens_mistral': 404, 'n_tokens_neox': 396, 'n_words': 121}