<commit_before>require "simpleselect/listNode.rb"

class List
    include Enumerable
    #DEFINIR each
    def initialize(nodo)
        raise unless nodo.is_a? (ListNode)
        @head = nodo
        @tail = nodo
    end
    def push (nodo)
        raise unless nodo.is_a? (ListNode)
        nodo.prev=@tail
        @tail.next=nodo
        @tail=nodo
    end
    
    def multiple_push (nodos)
        nodos.each { |i|
            raise unless i.is_a? (ListNode)
            push(i)
        }
    end
    def pop 
        aux = @head.value
        @head = @head.next
        @head.prev = nil
        aux
    end
    def vacia?
        a = false
        if (@head == nil)
            a = true
        end 
        a
    end 
    def headToTail()
<<<<<<< HEAD
        val=[@head]
        nodo=@head
        while (nodo!=@tail)do
            nodo=nodo.next
            val.push(nodo)
=======
        ###OJO FELIX jajjajajajja
       ## val=[@head.value] Antes estaba asi
        val=[@head.value]
        nodo=@head
        while (nodo!=@tail)do
            nodo=nodo.next
            val.push(nodo.value)      ###Cuando recorres pusheas nodos, no valores, entonces no puede inicializar con un valor si luego pusheas nodos
>>>>>>> 9d9bd68908f0d7c45aa08ef193c0a4d178ae6e53
        end
        val
    end
    def tailToHead()
        val=[@tail.value]
        nodo=@tail
        while (nodo!=@head)do
            nodo=nodo.prev<commit_msg>resueltos conflictos<commit_after>require "simpleselect/listNode.rb"

class List
    include Enumerable
    #DEFINIR each
    def initialize(nodo)
        raise unless nodo.is_a? (ListNode)
        @head = nodo
        @tail = nodo
    end
    def push (nodo)
        raise unless nodo.is_a? (ListNode)
        nodo.prev=@tail
        @tail.next=nodo
        @tail=nodo
    end
    
    def multiple_push (nodos)
        nodos.each { |i|
            raise unless i.is_a? (ListNode)
            push(i)
        }
    end
    def pop 
        aux = @head.value
        @head = @head.next
        @head.prev = nil
        aux
    end
    def vacia?
        a = false
        if (@head == nil)
            a = true
        end 
        a
    end 
    def headToTail()
        val=[@head]
        nodo=@head
        while (nodo!=@tail)do
            nodo=nodo.next
            val.push(nodo)
        end
        val
    end
    def tailToHead()
        val=[@tail.value]
        nodo=@tail
        while (nodo!=@head)do
            nodo=nodo.prev
{'fraction_non_alphanumeric': 0.10016155088852989, 'fraction_numerical': 0.009693053311793215, 'mean_word_length': 1.469591226321037, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '7286198', 'n_tokens_mistral': 867, 'n_tokens_neox': 843, 'n_words': 194}