<commit_before>package helpoptimal

type node struct {
	key *key
	next *node
	back *node
}

func newNodeNext(key *key, next *node) *node {
	newNode := new(node)
	newNode.key = key
	newNode.next = next
	
	return newNode
}
func newNodeBack(pre *node, key *key) *node {
	newNode := new(node)
	newNode.key = key
	newNode.back = pre
	
	return newNode
}
func newNodeKey(key *key) *node {
	newNode := new(node)
	newNode.key = key
	
	return newNode
}
<commit_msg>casNext in Go<commit_after>package helpoptimal

import (
	"unsafe"
	"sync/atomic"
)

type node struct {
	key *key
	next *node
	back *node
}

func newNodeNext(key *key, next *node) *node {
	newNode := new(node)
	newNode.key = key
	newNode.next = next
	
	return newNode
}
func newNodeBack(pre *node, key *key) *node {
	newNode := new(node)
	newNode.key = key
	newNode.back = pre
	
	return newNode
}
func newNodeKey(key *key) *node {
	newNode := new(node)
	newNode.key = key
	
	return newNode
}

func (t *node) casNext(o *node, n *node) bool {
	oldNext := o.next
	newNext := n.next
	return t.next == o && atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(&t.next)), unsafe.Pointer(oldNext), unsafe.Pointer(newNext))
}

{'fraction_non_alphanumeric': 0.13028764805414553, 'fraction_numerical': 0.0, 'mean_word_length': 4.07725321888412, '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': '4076691', 'n_tokens_mistral': 464, 'n_tokens_neox': 446, 'n_words': 121}