func Lines(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("lines")
	if len(args) == 0 {
		return wdte.GoFunc(Lines)
	}
	r := args[0].(reader)
	return scanner{s: bufio.NewScanner(r)}
}
Lines is a WDTE function with the following signature:

lines r

Returns a stream.Stream that yields, as strings, successive lines
read from the reader r.
package io
import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
	"github.com/DeedleFake/wdte"
	"github.com/DeedleFake/wdte/std"
	"github.com/DeedleFake/wdte/wdteutil"
)
var (
	Stdin  io.Reader = os.Stdin
	Stdout io.Writer = os.Stdout
	Stderr io.Writer = os.Stderr
)
type stdin struct{}
func (r stdin) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return r
}
func (stdin) Read(buf []byte) (int, error) {
	return Stdin.Read(buf)
}
func (stdin) String() string {
	return "<reader(stdin)>"
}
func (stdin) Reflect(name string) bool {
	return name == "Reader"
}
type stdout struct{}
func (w stdout) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return w
}
func (stdout) Write(data []byte) (int, error) {
	return Stdout.Write(data)
}
func (stdout) String() string {
	return "<writer(stdout)>"
}
func (stdout) Reflect(name string) bool {
	return name == "Writer"
}
type stderr struct{}
func (w stderr) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return w
}
func (stderr) Write(data []byte) (int, error) {
	return Stderr.Write(data)
}
func (stderr) String() string {
	return "<writer(stderr)>"
}
func (stderr) Reflect(name string) bool {
	return name == "Writer"
}
type reader interface {
	wdte.Func
	io.Reader
}
type Reader struct {
	io.Reader
}
func (r Reader) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return r
}
func (r Reader) String() string {
	if inner, ok := r.Reader.(fmt.Stringer); ok {
		return inner.String()
	}
	return "<reader>"
}
func (r Reader) Reflect(name string) bool {
	return name == "Reader"
}
type writer interface {
	wdte.Func
	io.Writer
}
type Writer struct {
	io.Writer
}
func (w Writer) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return w
}
func (w Writer) String() string {
	if inner, ok := w.Writer.(fmt.Stringer); ok {
		return inner.String()
	}
	return "<writer>"
}
func (w Writer) Reflect(name string) bool {
	return name == "Writer"
}
func Seek(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("seek")
	if len(args) < 3 {
		return wdteutil.SaveArgsReverse(wdte.GoFunc(Seek), args...)
	}
	s := args[0].(io.Seeker)
	off := int64(args[1].(wdte.Number))
	rel := args[2].(wdte.Number)
	var w int
	switch {
	case rel < 0:
		w = io.SeekEnd
	case rel == 0:
		w = io.SeekCurrent
	case rel > 0:
		w = io.SeekStart
	}
	_, err := s.Seek(off, w)
	if err != nil {
		return wdte.Error{Err: err, Frame: frame}
	}
	return s.(wdte.Func)
}
func Close(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("close")
	if len(args) == 0 {
		return wdte.GoFunc(Close)
	}
	c := args[0].(io.Closer)
	err := c.Close()
	if err != nil {
		return wdte.Error{Err: err, Frame: frame}
	}
	return c.(wdte.Func)
}
func Combine(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("combine")
	if len(args) < 2 {
		return wdteutil.SaveArgs(wdte.GoFunc(Combine), args...)
	}
	switch a0 := args[0].(type) {
	case reader:
		r := make([]io.Reader, 1, len(args))
		r[0] = a0
		for _, a := range args[1:] {
			r = append(r, a.(reader))
		}
		return Reader{Reader: io.MultiReader(r...)}
	case writer:
		w := make([]io.Writer, 1, len(args))
		w[0] = a0
		for _, a := range args[1:] {
			w = append(w, a.(writer))
		}
		return Writer{Writer: io.MultiWriter(w...)}
	default:
		panic(fmt.Errorf("Unexpected argument type: %T", a0))
	}
}
func Copy(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("copy")
	if len(args) < 2 {
		return wdteutil.SaveArgs(wdte.GoFunc(Copy), args...)
	}
	var w writer
	var r reader
	var a1 wdte.Func
	switch a0 := args[0].(type) {
	case writer:
		w = a0
		r = args[1].(reader)
		a1 = r
	case reader:
		w = args[1].(writer)
		r = a0
		a1 = w
	}
	_, err := io.Copy(w, r)
	if err != nil {
		return wdte.Error{Err: err, Frame: frame}
	}
	return a1
}
func String(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	frame = frame.Sub("string")
	if len(args) == 0 {
		return wdte.GoFunc(String)
	}
	r := args[0].(reader)
	var buf bytes.Buffer
	_, err := io.Copy(&buf, r)
	if err != nil {
		return wdte.Error{Err: err, Frame: frame}
	}
	return wdte.String(buf.String())
}
type scanner struct {
	s *bufio.Scanner
}
func (s scanner) Call(frame wdte.Frame, args ...wdte.Func) wdte.Func {
	return s
}
func (s scanner) Next(frame wdte.Frame) (wdte.Func, bool) {
	ok := s.s.Scan()
	if !ok {
		err := s.s.Err()
		if err != nil {
			return wdte.Error{Err: err, Frame: frame}, false
		}
		return nil, false
	}
	return wdte.String(s.s.Text()), true
}
func (s scanner) Reflect(name string) bool {
	return name == "Stream"
}