#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# vi:ts=4:et
# $Date: 2003/08/10 02:08:44 $
# $Revision: 1.1 $
# =====================================================
"""Test script for iterator.py"""

from young import iterator

def _test():
    # test for functional tools

    print "take"
    l = range(20)
    it = iter(l)
    for x in iterator.take(l, 5):
        print x,
    else:
        print

    print "slice"
    l = range(20)
    it = iter(l)
    for x in iterator.take(l, 3, 30, 2):
        print x,
    else:
        print


    print "drop"
    l = range(20)
    it = iter(l)
    for x in iterator.drop(it, 5):
        print x,
    else:
        print


_test()


