import strutils
    import sequtils
    import sugar
    
    echo "A".toLower
    echo ["A", "B", "C", "D"].map(x => toLower(x))
    echo ["A", "B", "C", "D"].map(toLower)
    
    
    Run

works fine

however, the last line of 
    
    
    echo 'A'.ord
    echo ['A', 'B', 'C', 'D'].map(x => ord(x))
    echo ['A', 'B', 'C', 'D'].map(ord)
    
    
    
    Run

says 
    
    
    R:\WHY.NIM(12, 31) Error: 'ord' cannot be passed to a procvar
    
    
    Run

so what makes this difference? Thanks

Reply via email to