summary refs log tree commit diff stats
path: root/tests/stdlib/tio.nim
blob: 5ae119f77632cdac3099c3ab754dcda137824ffa (plain) (blame)
1
2
3
4
5
6
7
# test the file-IO

proc main() =
  for line in lines("thello.nim"):
    writeln(stdout, line)

main()
pan class="w"> x y) (= (remainder x y) 0)) (define (sieve stream) (cons-stream (stream-car stream) (sieve (stream-filter (lambda (x) (not (divisible? x (stream-car stream)))) (stream-cdr stream))))) (define primes (sieve (stream-cdr integers)))