 
   into = source if into == undefined
 
-  if arrayIterableTest source
-    if whenBlock
-      for v, k in source when w = whenBlock v, k
-        break unless withBlock v, k, into, w
+  if source?
+    if arrayIterableTest source
+      if whenBlock
+        for v, k in source when whenBlock v, k
+          break unless withBlock v, k, into
+      else
+        for v, k in source
+          break unless withBlock v, k, into
     else
-      for v, k in source
-        break unless withBlock v, k, into
-  else
-    if whenBlock
-      for k, v of source when w = whenBlock v, k
-        break unless withBlock v, k, into, w
-    else
-      for k, v of source
-        break unless withBlock v, k, into
+      if whenBlock
+        for k, v of source when whenBlock v, k
+          break unless withBlock v, k, into
+      else
+        for k, v of source
+          break unless withBlock v, k, into
 
   into
 

    withBlock ||= returnFirst

    eachWhile source,
      if whenBlock then   (v, k, into, w) -> found   = withBlock v, k, null, w; false
      else                (v, k, into, w) -> !(found = withBlock v, k, null, w)
      whenBlock
      found = undefined


    withBlock ||= returnFirst

    e source,
      (v, k, into) -> into.push withBlock v, k, into
      whenBlock
      into ? []

