 class Sequence
   constructor: (src) ->
     if not src?
-      throw new Error('use null for the empty sequence')
+      @first = ->
+      @rest  = -> null
     else if typeof src.sequence == 'function'
       seq = src.sequence()
       @first = -> seq.first()


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

      @first = -> src[0]
      @rest  = -> partial(1)
    else
      throw new Error("cannot make a sequence from #{src}")

  @conj: (first, rest = (-> null), mode = null) ->
    r = rest() if mode == 'forced'
