       @first = -> src[0]
       @rest  = -> partial(1)
     else
-      throw new Error('cannot make a sequence from #{src}')
+      throw new Error("cannot make a sequence from #{src}")
 
   @conj: (first, rest = (-> null), mode = null) ->
     r = rest() if mode == 'forced'


  @::S = this

  make = (seq) -> seq and new Sequence(seq)

  @memo: (name, f) ->
    @[name]        = (seq) -> f.call(this, make(seq))


  @method 'flatten', (seq) ->
    if seq and seq.first()
      lazyConcat make(seq.first()), => @flatten__ seq.rest()
    else if seq and seq.rest()
      @flatten__ @dropWhile__ seq.rest(), (x) -> not x.first()
    else
