I'm using import sequtils. FilterIt and MapIt work fine, but countIt is not 
recognised despite being in the documentation for seqUtils. What am I doing 
wrong?
    
    
    import strformat
    import sequtils
    import Constants
    import Support
    
    const InputData = "Day03Test.txt"
    
    type
      State =tuple[ Data: seq[seq[char]], Transposed :seq[seq[char]]]
    
    let s = new State
    s.Data = toSeq((RawDataPath & InputData).lines).mapit(it.toseq())
    s.Transposed = s.Data.Transpose()
    
    proc Part01() =
        var
            myOnes:int
            myGamma,myEpsilon:string
        
        for myitem in s.Transposed:
            myOnes=myitem.countIt(it=='1')  ' countIt is underlined with the 
error message 'attempting to call undeclared routine'
    
    
    Run

Reply via email to