REBOL [
    Title:   "Total Size of .r Files"
    Date:    24-Apr-1999
    File:    %sizedir.r
    Purpose: {
        Print the total size of all .r files in the current
        directory.
    }
    Category: [file util 1] 
]

total: 0

foreach file load %./ [
    if find file ".r" [
        total: total + (size? file)
    ]
]

print [total "bytes"]