                     }
                     if let v = mapper(seed[i]) { result.append(v) }
                 }
-            // finite so break on broke :-)
-            } else {
+            } else { // finite so break on broke :-)
                 for var i = 0; result.count < need; i++ {
                     if i == seed.count { break }
                     if let v = mapper(seed[i]) { result.append(v) }

    case Two((Int, [T])->T?)
}
class LazyList<T,U> {
    let maker:LazyListMaker<T>?
    let seed:[T]?
    let mapper:T->U?
    let offset:Int
    /// lazy list.  infinite unless maker is nil
    init(maker:LazyListMaker<T>?, seed:[T]?,
        mapper:T->U?, offset:Int = 0) {
        self.maker  = maker
        self.seed   = seed
        self.mapper = mapper
        self.offset = offset
    }
    /// creates new mapper and installs it
    func map<V>(mapper:U->V?)->LazyList<T,V> {
        return LazyList<T,V>(
            maker:maker,
            seed:seed,
            mapper: { (t:T) -> V? in
                if let u = self.mapper(t) { return mapper(u) }
                else { return nil }

    /// which returns nil on false
    func filter(judge:U->Bool)->LazyList<T,U> {
        return LazyList<T,U>(
            maker:  maker,
            seed:   seed,
            mapper: { (t:T)-> U? in
                if let u = self.mapper(t) {
                    return judge(u) ? u : nil
